From 596e5e2440df2d32f1cf3e052dc633e774edf6ee Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Sun, 29 Mar 2026 21:48:23 +0800 Subject: Rename mingling to mingling_core and update dependencies --- mingling_core/src/program/setup.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 mingling_core/src/program/setup.rs (limited to 'mingling_core/src/program/setup.rs') diff --git a/mingling_core/src/program/setup.rs b/mingling_core/src/program/setup.rs new file mode 100644 index 0000000..e81247e --- /dev/null +++ b/mingling_core/src/program/setup.rs @@ -0,0 +1,19 @@ +use crate::{ProgramCollect, program::Program}; + +mod basic; +pub use basic::*; + +pub trait ProgramSetup { + fn setup(&mut self, program: &mut Program); +} + +impl Program +where + C: ProgramCollect, +{ + /// Load and execute init logic + pub fn with_setup + 'static>(&mut self, mut setup: S) -> S { + S::setup(&mut setup, self); + setup + } +} -- cgit