From 4588e17f7ddacd8391a5c881a209735e08d48797 Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Tue, 4 Aug 2026 13:26:48 +0800 Subject: feat: add entry metadata system with compile-time typed values Add `Metadata` trait and `#[metadata(Entry)]` attribute macro to attach arbitrary, compile-time-typed metadata to entries. Implement `ProgramCollect::get_metadata()` for runtime retrieval, backed by a global registry populated by `register_metadata!`. Extend `pathf` with `MetadataPattern` to resolve metadata types across modules at build time. Add two examples demonstrating metadata usage with and without pathf integration. --- mingling/src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'mingling/src/lib.rs') diff --git a/mingling/src/lib.rs b/mingling/src/lib.rs index 108d61a..01edae9 100644 --- a/mingling/src/lib.rs +++ b/mingling/src/lib.rs @@ -76,6 +76,7 @@ pub mod macros { #[cfg(all(feature = "structural_renderer", feature = "extras"))] pub use mingling_macros::group_structural; pub use mingling_macros::help; + pub use mingling_macros::metadata; pub use mingling_macros::mlint; pub use mingling_macros::node; pub use mingling_macros::pack; @@ -106,6 +107,8 @@ pub mod macros { #[doc(hidden)] pub use mingling_macros::register_help; #[doc(hidden)] + pub use mingling_macros::register_metadata; + #[doc(hidden)] pub use mingling_macros::register_renderer; #[doc(hidden)] pub use mingling_macros::register_type; -- cgit