Skip to main content

Module state

Module state 

Source
Expand description

Canonical plugin-state wire format.

Lives in truce-utils (rather than truce-core) so build-time tools - cargo-truce emits factory-preset files containing this envelope at install time - can produce byte-identical blobs without inheriting truce-core’s runtime dependency chain. truce-core::state re-exports everything here and layers the plugin-coupled helpers (apply_state, snapshot_plugin, …) on top.

Structs§

DeserializedState
Deserialized state.

Functions§

deserialize_state
Deserialize plugin state.
hash_plugin_id
Compute a simple hash of the plugin ID string for state identification.
serialize_state
Serialize plugin state: parameter values + extra state. Empty extra slice serializes as the same 0u64 length-prefix that an absent extra block would, so callers don’t need an Option wrapper to express “no extra state”.
vst3_cid
The 16-byte VST3 class ID for a plugin ID string.