aboutsummaryrefslogtreecommitdiff
path: root/mingling
diff options
context:
space:
mode:
Diffstat (limited to 'mingling')
-rw-r--r--mingling/Cargo.toml21
-rw-r--r--mingling/src/features.rs55
2 files changed, 70 insertions, 6 deletions
diff --git a/mingling/Cargo.toml b/mingling/Cargo.toml
index 6f1cc16..f17285f 100644
--- a/mingling/Cargo.toml
+++ b/mingling/Cargo.toml
@@ -37,17 +37,28 @@ features = [
]
[features]
+
+# Presets
+mini = ["extras", "picker"]
+advanced = ["extras", "picker", "repl", "comp", "dispatch_tree", "structural_renderer"]
+full = ["extras", "picker", "repl", "clap", "comp", "dispatch_tree", "structural_renderer_full", "pathf"]
+build_advanced = ["build", "comp"]
+build_full = ["build", "comp", "pathf", "dispatch_tree"]
+
+# Core
core = ["dep:mingling_core", "mingling_core/default"]
macros = ["dep:mingling_macros", "mingling_macros/default"]
+# Special features
nightly = ["mingling_core/nightly", "mingling_macros/nightly"]
debug = ["mingling_core/debug"]
async = ["mingling_core/async", "mingling_macros/async"]
-
-build = ["mingling_core/build"]
-
default = ["core", "macros"]
+build = ["mingling_core/build"]
+# - Section only shown in docs.rs
+docs_rs = []
+# Features
clap = ["mingling_core/clap", "mingling_macros/clap"]
dispatch_tree = ["mingling_core/dispatch_tree", "mingling_macros/dispatch_tree"]
repl = ["mingling_core/repl", "mingling_macros/repl"]
@@ -90,9 +101,7 @@ ron_serde_fmt = ["mingling_core/ron_serde_fmt"]
extras = ["mingling_macros/extras"]
-# Section only shown in docs.rs
-docs_rs = []
-
+# - LEGACY -
# These are old names, will be Breaking Change in the future
builds = ["mingling_core/build"]
diff --git a/mingling/src/features.rs b/mingling/src/features.rs
index d1fcbd2..2925f03 100644
--- a/mingling/src/features.rs
+++ b/mingling/src/features.rs
@@ -1,3 +1,14 @@
+/// Whether the `advanced` feature is enabled
+/// Current: `disabled`
+#[cfg(not(feature = "advanced"))]
+#[allow(unused)]
+pub const MINGLING_ADVANCED: bool = false;
+
+/// Whether the `advanced` feature is enabled
+/// Current: `enabled`
+#[cfg(feature = "advanced")]
+#[allow(unused)]
+pub const MINGLING_ADVANCED: bool = true;
/// Whether the `all_serde_fmt` feature is enabled
/// Current: `disabled`
#[cfg(not(feature = "all_serde_fmt"))]
@@ -31,6 +42,28 @@ pub const MINGLING_BUILD: bool = false;
#[cfg(feature = "build")]
#[allow(unused)]
pub const MINGLING_BUILD: bool = true;
+/// Whether the `build_advanced` feature is enabled
+/// Current: `disabled`
+#[cfg(not(feature = "build_advanced"))]
+#[allow(unused)]
+pub const MINGLING_BUILD_ADVANCED: bool = false;
+
+/// Whether the `build_advanced` feature is enabled
+/// Current: `enabled`
+#[cfg(feature = "build_advanced")]
+#[allow(unused)]
+pub const MINGLING_BUILD_ADVANCED: bool = true;
+/// Whether the `build_full` feature is enabled
+/// Current: `disabled`
+#[cfg(not(feature = "build_full"))]
+#[allow(unused)]
+pub const MINGLING_BUILD_FULL: bool = false;
+
+/// Whether the `build_full` feature is enabled
+/// Current: `enabled`
+#[cfg(feature = "build_full")]
+#[allow(unused)]
+pub const MINGLING_BUILD_FULL: bool = true;
/// Whether the `builds` feature is enabled
/// Current: `disabled`
#[cfg(not(feature = "builds"))]
@@ -141,6 +174,17 @@ pub const MINGLING_EXTRAS: bool = false;
#[cfg(feature = "extras")]
#[allow(unused)]
pub const MINGLING_EXTRAS: bool = true;
+/// Whether the `full` feature is enabled
+/// Current: `disabled`
+#[cfg(not(feature = "full"))]
+#[allow(unused)]
+pub const MINGLING_FULL: bool = false;
+
+/// Whether the `full` feature is enabled
+/// Current: `enabled`
+#[cfg(feature = "full")]
+#[allow(unused)]
+pub const MINGLING_FULL: bool = true;
/// Whether the `json_serde_fmt` feature is enabled
/// Current: `disabled`
#[cfg(not(feature = "json_serde_fmt"))]
@@ -163,6 +207,17 @@ pub const MINGLING_MACROS: bool = false;
#[cfg(feature = "macros")]
#[allow(unused)]
pub const MINGLING_MACROS: bool = true;
+/// Whether the `mini` feature is enabled
+/// Current: `disabled`
+#[cfg(not(feature = "mini"))]
+#[allow(unused)]
+pub const MINGLING_MINI: bool = false;
+
+/// Whether the `mini` feature is enabled
+/// Current: `enabled`
+#[cfg(feature = "mini")]
+#[allow(unused)]
+pub const MINGLING_MINI: bool = true;
/// Whether the `nightly` feature is enabled
/// Current: `disabled`
#[cfg(not(feature = "nightly"))]