Skip to main content

Crate ferraus_plugins

Crate ferraus_plugins 

Source
Expand description

§ferraus-plugins

Headless CLAP and VST3 plugin hosting for ferraus, always out of process, plus the installable sounds registry.

  • protocol — the wire protocol spoken with ferraus-plughost (CLAP) and ferraus-plughost-vst3 (VST3); see PROTOCOL.md.
  • host_rt — the host-process side of the protocol, shared by both host binaries.

With the default ops feature:

  • client — spawns a host process per plugin instance, with a watchdog.
  • api — api::render_instrument and api::process_effect, the entry points used by ferraus-synth and other crates.
  • scan — plugin discovery and the scan cache; resolve — the sound resolver (aliases, installed sounds, --sound-path folders).
  • sounds — the signed sounds registry and sounds ... commands.

Re-exports§

pub use api::process_effect;
pub use api::process_effect_with;
pub use api::render_instrument;
pub use api::render_instrument_with;
pub use api::MidiEvent;
pub use api::MidiEventKind;
pub use api::PluginFormat;
pub use api::PluginOptions;
pub use api::PluginRef;
pub use api::PluginRun;

Modules§

api
Public entry points for running plugins from other crates (ferraus-synth renders InstrumentSource::Plugin through render_instrument; effect chains use process_effect). Every call starts its own host process, so a misbehaving plugin surfaces as an ErrorKind::Plugin error and never takes the caller down.
client
The ferraus side of the host protocol: spawns one host process per plugin instance, sends framed JSON requests, moves audio through a memory-mapped temp file, and enforces the watchdog. A crash or timeout becomes ErrorKind::Plugin (exit code 7) naming the plugin and its path; the calling process is never affected.
host_rt
The host-process side of the protocol: framing, shared-memory mapping, and dispatch to a format backend (CLAP in ferraus-plughost, VST3 in ferraus-plughost-vst3).
protocol
The wire protocol between ferraus and a plugin host process (ferraus-plughost for CLAP, ferraus-plughost-vst3 for VST3). See PROTOCOL.md in this crate for the full spec.
resolve
The sound resolver: turns an instrument name (piano, strings, plugin:"Surge XT", sf2:/path/gm.sf2) into a concrete sound, in the PRD’s order:
scan
Plugin discovery: standard per-OS folders plus extra folders, CLAP probing in a host subprocess (a crashing plugin cannot kill the scan), VST3 metadata from moduleinfo.json, and a cache at <cache>/plugins/scan.json keyed by path and mtime.
sounds
The installable sounds registry: a signed JSON manifest of free instruments, SoundFonts, SFZ libraries, and impulse responses, and the sounds ... commands.

Functions§

ops
Ops this crate contributes to the command registry.