diff options
| author | 魏曹先生 <1992414357@qq.com> | 2025-09-12 01:02:02 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2025-09-12 01:02:02 +0800 |
| commit | 6cc36992b397bcfd40440891ca6d007ae00d1169 (patch) | |
| tree | 2368f0c200fe914f3b3d4a7ee18ba39f96449fda | |
| parent | 80ec3487d24cdaa990db5d6f9ea8c1777b51f90b (diff) | |
Update crate `cfg_file`
Add feature `derive`
| -rw-r--r-- | Cargo.lock | 4 | ||||
| -rw-r--r-- | Cargo.toml | 7 | ||||
| -rw-r--r-- | crates/utils/cfg_file/Cargo.toml | 5 | ||||
| -rw-r--r-- | crates/utils/cfg_file/src/lib.rs | 6 |
4 files changed, 20 insertions, 2 deletions
@@ -81,6 +81,7 @@ name = "cfg_file" version = "0.1.0" dependencies = [ "async-trait", + "cfg_file_derive", "ron", "serde", "serde_json", @@ -155,6 +156,9 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "just_enough_vcs" version = "0.1.0" +dependencies = [ + "cfg_file", +] [[package]] name = "libc" @@ -2,11 +2,13 @@ name = "just_enough_vcs" version = "0.1.0" edition = "2024" - license-file = "LICENSE-MIT.md" - authors = [ "Weicao-CatilGrass (GitHub)" ] +[features] +default = ["cfg_file"] +cfg_file = [] + [workspace] members = [ @@ -41,3 +43,4 @@ panic = "abort" strip = "symbols" [dependencies] +cfg_file = { path = "crates/utils/cfg_file" }
\ No newline at end of file diff --git a/crates/utils/cfg_file/Cargo.toml b/crates/utils/cfg_file/Cargo.toml index 9d9a6b8..c3bb4a4 100644 --- a/crates/utils/cfg_file/Cargo.toml +++ b/crates/utils/cfg_file/Cargo.toml @@ -3,7 +3,12 @@ name = "cfg_file" edition = "2024" version.workspace = true +[features] +default = ["derive"] +derive = [] + [dependencies] +cfg_file_derive = { path = "cfg_file_derive" } # Async tokio = { version = "1.46.1", features = ["full"] } diff --git a/crates/utils/cfg_file/src/lib.rs b/crates/utils/cfg_file/src/lib.rs index a105933..945c3fd 100644 --- a/crates/utils/cfg_file/src/lib.rs +++ b/crates/utils/cfg_file/src/lib.rs @@ -1 +1,7 @@ +#[cfg(feature = "derive")] +extern crate cfg_file_derive; + +#[cfg(feature = "derive")] +pub use cfg_file_derive::*; + pub mod config;
\ No newline at end of file |
