pub struct RebuildCallbacks {
pub package_name: Option<String>,
pub write_sidecar: Option<SidecarWriterFn>,
pub write_ts_types: Option<TsTypesWriterFn>,
pub write_processor_ts_types: Option<ProcessorTsTypesWriterFn>,
pub param_loader: ParamLoaderFn,
pub processor_loader: Option<ProcessorLoaderFn>,
pub additional_watch_paths: Vec<PathBuf>,
}Expand description
Callbacks for CLI-specific operations.
The rebuild pipeline needs to perform operations that depend on CLI infrastructure (dylib discovery, subprocess parameter extraction, sidecar caching). These are injected as callbacks to keep the dev-server crate independent of CLI internals.
Fields§
§package_name: Option<String>Engine package name for cargo build --package flag.
None means no --package flag (single-crate project).
write_sidecar: Option<SidecarWriterFn>Optional sidecar cache writer (writes params to JSON file).
write_ts_types: Option<TsTypesWriterFn>Optional TypeScript types writer (writes generated parameter ID typings).
write_processor_ts_types: Option<ProcessorTsTypesWriterFn>Optional TypeScript types writer for processor IDs.
param_loader: ParamLoaderFnLoads parameters from the rebuilt dylib (async). Receives the engine directory and returns parsed parameters.
processor_loader: Option<ProcessorLoaderFn>Loads processors from the rebuilt dylib (async).
additional_watch_paths: Vec<PathBuf>Additional Rust source paths to watch for hot-reload triggers.
This is primarily used in SDK development mode where the active engine
depends on sibling workspace crates (e.g. engine/crates/wavecraft-processors).