aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-07-14 19:10:05 +0800
committer魏曹先生 <1992414357@qq.com>2026-07-14 19:10:15 +0800
commit538516a2104edba2c35b1f4ce40ec5a25589b62b (patch)
tree369443ab85529b1584e16047bd7c2237886b2578
parent17e59392be8b08bc6e323551d2e4b12f770bfe88 (diff)
feat(picker): add optional `core` feature with re-exports
Define a `core` feature in mingling_picker that gates a new `corebind` module and re-exports its contents. The module is propagated to the upstream `mingling` crate under the same feature flag.
-rw-r--r--mingling/src/lib.rs3
-rw-r--r--mingling_picker/Cargo.toml5
-rw-r--r--mingling_picker/src/corebind.rs1
-rw-r--r--mingling_picker/src/lib.rs6
4 files changed, 14 insertions, 1 deletions
diff --git a/mingling/src/lib.rs b/mingling/src/lib.rs
index ba87f85..9b13408 100644
--- a/mingling/src/lib.rs
+++ b/mingling/src/lib.rs
@@ -91,6 +91,9 @@ pub mod picker {
pub mod parselib {
pub use mingling_picker::parselib::*;
}
+
+ #[cfg(feature = "core")]
+ pub use mingling_picker::corebind::*;
}
/// Re-export of all macros from `mingling_macros`.
diff --git a/mingling_picker/Cargo.toml b/mingling_picker/Cargo.toml
index aae4d54..a585a39 100644
--- a/mingling_picker/Cargo.toml
+++ b/mingling_picker/Cargo.toml
@@ -8,6 +8,9 @@ authors = ["Weicao-CatilGrass"]
readme = "README.md"
description = "Mingling's lightweight argument parser"
+[features]
+core = ["dep:mingling_core"]
+
[dependencies]
-mingling_core.workspace = true
+mingling_core = { workspace = true, optional = true }
mingling_picker_macros.workspace = true
diff --git a/mingling_picker/src/corebind.rs b/mingling_picker/src/corebind.rs
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/mingling_picker/src/corebind.rs
@@ -0,0 +1 @@
+
diff --git a/mingling_picker/src/lib.rs b/mingling_picker/src/lib.rs
index 4056283..d3d3fdd 100644
--- a/mingling_picker/src/lib.rs
+++ b/mingling_picker/src/lib.rs
@@ -19,3 +19,9 @@ pub mod prelude {
pub mod macros {
pub use mingling_picker_macros::*;
}
+
+#[cfg(feature = "core")]
+mod corebind;
+
+#[cfg(feature = "core")]
+pub use corebind::*;