From 2fa18e2190fb3c17892e13cb06d330e707dc05ec Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Mon, 29 Jun 2026 14:12:24 +0800 Subject: feat(pathf): add dispatch tree config and pass feature to analyzer Add `PathfinderConfig` struct to control dispatch tree extraction, and wire `use_dispatch_tree` through `DispatcherPattern`, `init_with_config`, and `analyze_and_build_type_mapping_for`. Expose config and wrapper from `mingling_core` under the `pathf` feature. --- mingling_pathf/src/config.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 mingling_pathf/src/config.rs (limited to 'mingling_pathf/src/config.rs') diff --git a/mingling_pathf/src/config.rs b/mingling_pathf/src/config.rs new file mode 100644 index 0000000..6758264 --- /dev/null +++ b/mingling_pathf/src/config.rs @@ -0,0 +1,19 @@ +/// Configuration for the module pathfinder analysis. +/// +/// Controls behavior such as whether dispatch-tree related types +/// (`__internal_dispatcher_*`) should be extracted. +#[derive(Debug, Clone, Default)] +pub struct PathfinderConfig { + /// Whether to also extract `__internal_dispatcher_*` static types + /// generated by the `dispatch_tree` feature in Mingling. + pub use_dispatch_tree: bool, +} + +impl PathfinderConfig { + /// Create a config with `use_dispatch_tree` enabled. + pub fn with_dispatch_tree() -> Self { + Self { + use_dispatch_tree: true, + } + } +} -- cgit