Optional native hosting boundary¶
ravet-host discovers explicit bounded CLAP candidates without executing them,
then loads a caller-selected trusted library through an unsafe native-code
boundary. It owns bounded byte-preserving metadata and exposes Clack's retained
entry for consumer-owned instance/callback/audio/state policy. A main-thread borrowing guard owns negotiated GUI lifecycle
with explicit native parent lifetime. It supplies
no automatic system scan, sandbox or device dependency to portable processing.
See plug-in hosting.
Explicit graph audio sessions may bracket processing with optional
Processor::start_audio/stop_audio hooks. Their defaults are no-ops; existing
adapters retain ordinary portable behavior. Owner-confined borrowed graph sessions
start/stop nodes on audio and return stopped graphs for control deactivation.
See graph sessions for rollback,
retirement and native integration limits.
Native/backend runtime BackendFailure clears outputs/events while acknowledging
that native histories may have advanced. This differs from validation rejection
before mutation; consumers stop/reset/rebuild under their session policy. Hosted
graph nodes use that explicit runtime fault contract. Their prepared f32/f64
scratch matches the native sample format; f64 requires advertised native port
support before activation, without precision conversion. Explicit packed-port
factories preserve native enumeration boundaries while graph routes use summed
main channel indices; portable auxiliary pairing is not inferred. Block-start
transport is separately enabled while stopped on main; unrepresentable known
context rejects before native calls with InvalidTransport. Separate parameter
input factories cache validated writable metadata/identities and fixed event slots
on main; audio processes exact offsets or flushes zero-frame input without
advancing native process time. The preparation builder also selects bounded global
parameter output, including read-only telemetry: checked mapped output publishes
through graph event routes, while runtime output faults clear the block without
rolling back native history. Other native event kinds remain separate mappings.
The native preparation builder also selects one explicit note/MIDI input index and dialect, sharing bounded slots with optional global parameters. Whole input validates before native calls, preserving offsets/order; zero-frame performance rejects before parameter flush. CLAP notes use wildcard IDs, MIDI/MPE quantize velocity, and MIDI2 preserves framed UMP without translation. See the selected-input guide and decision 0114 for limits and probes.
A separate selected native performance-output profile shares bounded output storage with mapped parameters. It preserves representable CLAP notes, short MIDI/MPE or framed UMP through explicit graph edges; unsupported targets filter, and selected malformed output clears audio/events with nonrollback failure. See the output guide and decision 0115.
Hosted native graphs expose guarded main-thread editor creation through their retained control. The separately owned audio node may run, while exclusive editor borrowing prevents control retirement until GUI destruction. Core callbacks can be serviced once per consumer main tick through the guard. See the hosting guide and decision 0116.
The optional device crate has an explicit buffered f32 graph-worker output bridge. A non-Send graph session stays on its worker while a separate device processor consumes a prepared queue; stop/join precedes main graph/native retirement. No device clock or callback-thread teardown is inferred. See the device guide and decision 0117.
The optional ravet-native crate prepares generic f32/f64 main/auxiliary planar
scratch and typed generated events for consumer native shims. Its narrow pointer
module copies all inputs before output writes and contains processing panic with
explicit poisoning. Public Gain C handles use this core; product event/state
codecs, SDK registration/editor/format mapping remain outside it. Optional native
facade traits expose control-cached global state and separate raw f64 telemetry on
exclusive prepared owners; control byte codecs and cross-thread publication remain
explicitly separate. See the
native processing guide and
decision 0142.