diff options
Diffstat (limited to 'mingling')
| -rw-r--r-- | mingling/Cargo.toml | 9 | ||||
| -rw-r--r-- | mingling/src/docs/lib.md | 2 | ||||
| -rw-r--r-- | mingling/src/features.rs | 22 |
3 files changed, 30 insertions, 3 deletions
diff --git a/mingling/Cargo.toml b/mingling/Cargo.toml index 7c7993b..f0515d8 100644 --- a/mingling/Cargo.toml +++ b/mingling/Cargo.toml @@ -37,8 +37,8 @@ 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"] +advanced = ["extras", "picker", "repl", "comp", "structural_renderer", "pathf"] +full = ["extras", "picker", "repl", "clap", "comp", "dispatch_tree", "structural_renderer_full"] # Core core = ["dep:mingling_core", "mingling_core/default"] @@ -54,7 +54,12 @@ docs_rs = [] # Features clap = ["mingling_core/clap", "mingling_macros/clap"] + +# Dispatch strategy (mutually exclusive; none = auto, currently linear) +dispatch_linear = ["mingling_macros/dispatch_linear"] dispatch_tree = ["mingling_macros/dispatch_tree"] +dispatch_phf = ["mingling_macros/dispatch_phf"] + repl = ["mingling_core/repl", "mingling_macros/repl"] comp = ["mingling_core/comp", "mingling_macros/comp"] picker = ["mingling_core/picker", "dep:arg-picker", "arg-picker/mingling_support"] diff --git a/mingling/src/docs/lib.md b/mingling/src/docs/lib.md index 3b1f328..2f8c8b9 100644 --- a/mingling/src/docs/lib.md +++ b/mingling/src/docs/lib.md @@ -80,7 +80,7 @@ See [Examples](EXAMPLES/index.html) or [Helpdoc](https://mingling-rs.github.io/m ## About Features -All features of `Mingling` are opt-in. To learn what each feature provides, see [Features](feature/index.html) or [Helpdoc](https://mingling-rs.github.io/mingling/docs/doc.html#/pages/other/features) +All features of `Mingling` are opt-in. To learn what each feature provides, see [Features](feature/index.html) or [Helpdoc](https://mingling-rs.github.io/mingling/docs/index.html#/pages/other/features) ## Use unreleased version diff --git a/mingling/src/features.rs b/mingling/src/features.rs index 8a3ce75..3d9a382 100644 --- a/mingling/src/features.rs +++ b/mingling/src/features.rs @@ -86,6 +86,28 @@ pub const MINGLING_DEFAULT: bool = false; #[cfg(feature = "default")] #[allow(unused)] pub const MINGLING_DEFAULT: bool = true; +/// Whether the `dispatch_linear` feature is enabled +/// Current: `disabled` +#[cfg(not(feature = "dispatch_linear"))] +#[allow(unused)] +pub const MINGLING_DISPATCH_LINEAR: bool = false; + +/// Whether the `dispatch_linear` feature is enabled +/// Current: `enabled` +#[cfg(feature = "dispatch_linear")] +#[allow(unused)] +pub const MINGLING_DISPATCH_LINEAR: bool = true; +/// Whether the `dispatch_phf` feature is enabled +/// Current: `disabled` +#[cfg(not(feature = "dispatch_phf"))] +#[allow(unused)] +pub const MINGLING_DISPATCH_PHF: bool = false; + +/// Whether the `dispatch_phf` feature is enabled +/// Current: `enabled` +#[cfg(feature = "dispatch_phf")] +#[allow(unused)] +pub const MINGLING_DISPATCH_PHF: bool = true; /// Whether the `dispatch_tree` feature is enabled /// Current: `disabled` #[cfg(not(feature = "dispatch_tree"))] |
