From 3668b49c0d3423f1d5d10bb6b4a0e0e7b61f2046 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 3 Aug 2026 00:27:31 +0800 Subject: docs: Add preset feature groups and improve feature docs Add convenience presets (`mini`, `advanced`, `full`, `build_advanced`, `build_full`) to `mingling/Cargo.toml` and document them in both English and Chinese feature docs. Update getting-started guides to reflect the new default `core`/`macros` features. --- mingling/src/features.rs | 55 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) (limited to 'mingling/src') 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"))] -- cgit