WIP: clap

This commit is contained in:
2026-02-20 22:14:21 +01:00
parent bf361d3ab9
commit 6216b9341b
76 changed files with 9103 additions and 143 deletions

View File

@@ -69,6 +69,7 @@ pub struct App {
pub options: OptionsState,
pub panel: PanelState,
pub midi: MidiState,
pub plugin_mode: bool,
}
impl Default for App {
@@ -82,6 +83,15 @@ impl App {
let variables = Arc::new(ArcSwap::from_pointee(HashMap::new()));
let dict = Arc::new(Mutex::new(HashMap::new()));
let rng = Arc::new(Mutex::new(StdRng::seed_from_u64(0)));
Self::build(variables, dict, rng)
}
#[allow(dead_code)]
pub fn with_shared(variables: Variables, dict: Dictionary, rng: Rng) -> Self {
Self::build(variables, dict, rng)
}
fn build(variables: Variables, dict: Dictionary, rng: Rng) -> Self {
let script_engine =
ScriptEngine::new(Arc::clone(&variables), Arc::clone(&dict), Arc::clone(&rng));
let live_keys = Arc::new(LiveKeyState::new());
@@ -113,6 +123,7 @@ impl App {
options: OptionsState::default(),
panel: PanelState::default(),
midi: MidiState::new(),
plugin_mode: false,
}
}