From 69250e8f99c16c70ffe04fccf3192eb648f6e4f5 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sun, 28 Jun 2026 04:10:24 +0800 Subject: feat(workspace): add mingling_pathf crate and pathf feature --- Cargo.lock | 5 ++++ Cargo.toml | 6 ++++- mingling/Cargo.toml | 5 ++-- mingling/src/features.rs | 11 ++++++++ mingling_core/Cargo.toml | 3 +++ mingling_core/src/builds.rs | 3 +++ mingling_macros/Cargo.toml | 1 + mingling_pathf/Cargo.toml | 8 ++++++ mingling_pathf/LICENSE-APACHE | 1 + mingling_pathf/LICENSE-MIT | 1 + mingling_pathf/README.md | 49 ++++++++++++++++++++++++++++++++++++ mingling_pathf/src/lib.rs | 0 minglingmingling_pathfLICENSE-APACHE | 1 + minglingmingling_pathfLICENSE-MIT | 1 + 14 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 mingling_pathf/Cargo.toml create mode 120000 mingling_pathf/LICENSE-APACHE create mode 120000 mingling_pathf/LICENSE-MIT create mode 100644 mingling_pathf/README.md create mode 100644 mingling_pathf/src/lib.rs create mode 120000 minglingmingling_pathfLICENSE-APACHE create mode 120000 minglingmingling_pathfLICENSE-MIT diff --git a/Cargo.lock b/Cargo.lock index 62001a3..64d1da9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -421,6 +421,7 @@ dependencies = [ "just_fmt", "just_template", "log", + "mingling_pathf", "ron", "serde", "serde_json", @@ -438,6 +439,10 @@ dependencies = [ "syn", ] +[[package]] +name = "mingling_pathf" +version = "0.2.0" + [[package]] name = "mio" version = "1.2.0" diff --git a/Cargo.toml b/Cargo.toml index acf96af..fedb095 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [workspace] resolver = "2" -members = ["mingling", "mingling_core", "mingling_macros", "mling"] +members = ["mingling", "mingling_core", "mingling_macros", "mingling_pathf", "mling"] exclude = [ # README-Tests "./temp/*", @@ -16,6 +16,10 @@ exclude = [ ] [workspace.dependencies] +mingling_core = { path = "mingling_core", default-features = false } +mingling_macros = { path = "mingling_macros", default-features = false } +mingling_pathf = { path = "mingling_pathf", default-features = false } + just_fmt = "0.1.2" just_template = "0.1.3" diff --git a/mingling/Cargo.toml b/mingling/Cargo.toml index 0f2b37b..be223fe 100644 --- a/mingling/Cargo.toml +++ b/mingling/Cargo.toml @@ -44,6 +44,7 @@ dispatch_tree = ["mingling_core/dispatch_tree", "mingling_macros/dispatch_tree"] repl = ["mingling_core/repl", "mingling_macros/repl"] comp = ["mingling_core/comp", "mingling_macros/comp"] parser = ["dep:size"] +pathf = ["mingling_core/pathf", "mingling_macros/pathf"] structural_renderer = [ "mingling_core/structural_renderer", @@ -80,7 +81,7 @@ ron_serde_fmt = ["mingling_core/ron_serde_fmt"] extra_macros = ["mingling_macros/extra_macros"] [dependencies] -mingling_core = { path = "../mingling_core", default-features = false } -mingling_macros = { path = "../mingling_macros", default-features = false } +mingling_core.workspace = true +mingling_macros.workspace = true serde = { workspace = true, optional = true } size = { version = "0.5", optional = true } diff --git a/mingling/src/features.rs b/mingling/src/features.rs index 8f147fb..4d0c50b 100644 --- a/mingling/src/features.rs +++ b/mingling/src/features.rs @@ -130,6 +130,17 @@ pub const MINGLING_PARSER: bool = false; #[cfg(feature = "parser")] #[allow(unused)] pub const MINGLING_PARSER: bool = true; +/// Whether the `pathf` feature is enabled +/// Current: `disabled` +#[cfg(not(feature = "pathf"))] +#[allow(unused)] +pub const MINGLING_PATHF: bool = false; + +/// Whether the `pathf` feature is enabled +/// Current: `enabled` +#[cfg(feature = "pathf")] +#[allow(unused)] +pub const MINGLING_PATHF: bool = true; /// Whether the `repl` feature is enabled /// Current: `disabled` #[cfg(not(feature = "repl"))] diff --git a/mingling_core/Cargo.toml b/mingling_core/Cargo.toml index b22a630..85afd55 100644 --- a/mingling_core/Cargo.toml +++ b/mingling_core/Cargo.toml @@ -28,8 +28,11 @@ repl = [] clap = [] comp = ["dep:just_template"] debug = ["dep:log", "dep:env_logger"] +pathf = ["dep:mingling_pathf"] [dependencies] +mingling_pathf = { workspace = true, optional = true } + just_fmt.workspace = true # comp diff --git a/mingling_core/src/builds.rs b/mingling_core/src/builds.rs index 0123c82..51bafe6 100644 --- a/mingling_core/src/builds.rs +++ b/mingling_core/src/builds.rs @@ -1,3 +1,6 @@ #[doc(hidden)] #[cfg(feature = "comp")] pub mod comp; + +#[cfg(all(feature = "builds", feature = "pathf"))] +pub use mingling_pathf::*; diff --git a/mingling_macros/Cargo.toml b/mingling_macros/Cargo.toml index db65381..66f654b 100644 --- a/mingling_macros/Cargo.toml +++ b/mingling_macros/Cargo.toml @@ -23,6 +23,7 @@ comp = [] dispatch_tree = [] structural_renderer = [] repl = [] +pathf = [] extra_macros = [] diff --git a/mingling_pathf/Cargo.toml b/mingling_pathf/Cargo.toml new file mode 100644 index 0000000..90d94da --- /dev/null +++ b/mingling_pathf/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "mingling_pathf" +version.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true + +[dependencies] diff --git a/mingling_pathf/LICENSE-APACHE b/mingling_pathf/LICENSE-APACHE new file mode 120000 index 0000000..965b606 --- /dev/null +++ b/mingling_pathf/LICENSE-APACHE @@ -0,0 +1 @@ +../LICENSE-APACHE \ No newline at end of file diff --git a/mingling_pathf/LICENSE-MIT b/mingling_pathf/LICENSE-MIT new file mode 120000 index 0000000..76219eb --- /dev/null +++ b/mingling_pathf/LICENSE-MIT @@ -0,0 +1 @@ +../LICENSE-MIT \ No newline at end of file diff --git a/mingling_pathf/README.md b/mingling_pathf/README.md new file mode 100644 index 0000000..9706083 --- /dev/null +++ b/mingling_pathf/README.md @@ -0,0 +1,49 @@ +
+
+
+
+