Soundor
Web Runtime

Web Runtime 0.14.0 Contains breaking changes

Release notes for Web Runtime 0.14.0.

All Web Runtime releases

17 changes — 11 features, 3 fixes, 3 breaking changes

Minor Changes

  • #303 78f82f2 Thanks @dm-balakin! - Declare plugin kind, categories and vendor metadata, audio buses and complete supported layouts, latency/tail reporting, parameter groups and a host bypass role. Generate JUCE host integration and explicit browser channel counts, with validation for unsupported browser buses. Existing projects retain handwritten audio setup unless they opt into the audio contract. MIDI and presets are separate features.

  • #320 1cb3161 Thanks @dm-balakin! - The engine hosts the plugin's Rust processor, natively and in the browser; the runtimes keep the audio callback, the AudioContext and the plugin's lifecycle. Neither the Rust SDK nor its ABI changes, and a plugin's code needs no change.

    • @soundor/engine: soundor/processor/RustProcessor.h, the bridge to the processor's C ABI (RustProcessorAbi.h, moved from the JUCE runtime), free of JUCE: processor::RustProcessor processes an array of channel pointers in place, and reaches the plugin's linked library through processor::linkedRustProcessor(), so the engine itself references none of its symbols. @soundor/engine/web/processor: WasmProcessor, the AudioWorklet and createProcessorNode(), moved from the web runtime, apart from @soundor/engine/web.
    • @soundor/juce-runtime: the generated processor uses the engine's bridge; backend::RustProcessor becomes processor::RustProcessor (rustProcessor() returns it), and the JUCE adapter (JuceRustProcessor.h) keeps backend::rustBusLayout(), backend::rustTransport() and backend::processRust().
    • @soundor/web-runtime: the host loads the engine's processor host only once the plugin has a processor and audio starts. @soundor/web-runtime/processor is the engine's entry; @soundor/web-runtime/client no longer exports createProcessorNode, which @soundor/web-runtime/processor has.
  • #303 a718364 Thanks @dm-balakin! - Declare validated factory presets in config and load them synchronously through soundor:presets or the generated C++ processor. Share the existing parameter/state stores and StateHistory, including opt-in atomic undo entries, nested transactions, selection and modified tracking, and restoration matching. Expose JUCE host programs from the same catalog; preserve DAW state/preset compatibility without changing the snapshot format. Include matching Web and simulated runtime APIs.

  • #327 a114b13 Thanks @dm-balakin! - Manage the complete Web host inside the runtime package, without a scaffolded runtimes/web project. Configure built-in input sources with webRuntime({ inputs }) or supply a browser TypeScript/JavaScript module and compose custom inputs with factories from @soundor/web-runtime/input. Custom input modules use a separate browser TypeScript project; projects using built-in inputs need no browser configuration. Legacy web host directories require explicit migration; the user-owned Vite integration entry is removed.

  • #326 8002969 Thanks @dm-balakin! - Require every plugin to export its Rust processor and controller. Scaffold separate entry, controller and processor modules, including an empty controller when no native methods are configured.

    Run the same generated Rust NativeMethods contract in browsers through WASM, with instance stores, wake-driven async execution, control-thread scheduling, host services and resource publication to the separate AudioWorklet processor. Remove production WebNativeApi implementations and the browser host's native option. Move those methods to Rust and regenerate/rebuild existing projects. The portable Send/Sync bounds remain; unblock is native-only, and browser futures execute cooperatively on the main thread.

  • #333 c15667d Thanks @dm-balakin! - Wire MIDI into native and Web processor hosting, the JavaScript module, controller transport and test runtime. Add bounded AudioWorklet delivery, explicit Web MIDI device routing, JUCE capabilities, VST3 host virtual input/conversion and optional Linux ALSA input. MIDI effects default to an audio-free layout.

  • #321 bb8b0a0 Thanks @dm-balakin! - Breaking: native channels are now called native streams, so they are not confused with an audio buffer's channels. The behavior is unchanged: they still go from audio to the UI only, keep only the latest value, deliver at most one value per frame, and publish without locks or allocations.

    • Config: native.channels is now native.streams, and no method can be called streams.
    • UI: import { streams } from 'soundor:native', typed NativeStream<T>.
    • Rust: ctx.streams.peak.publish(…). soundor::Streams, ValueStream, BufferStream and StreamElement replace Channels, ValueChannel, BufferChannel and ChannelElement. TestProcessor::stream() and stream_buffer() replace channel() and channel_buffer().
    • C++: soundor::native::Streams replaces native::Channels, and the processor's member is nativeStreams. The engine's soundor/js/Streams.h declares js::ValueStream<T> and js::BufferStream<T>, with js::deliverStreams(), bind::connectStreams() and bind::installStreams(). TickStatistics::streams replaces TickStatistics::channels.
    • Tests: publishStream(name, value) from @soundor/testing-library replaces publishChannel().
    • Web: the generated contract exports streams to the project's runtimes/web code. @soundor/engine/web's processor takes streams and reports changes through onStreams.

    The Rust processor's binary interfaces keep their layout and their WebAssembly export names (soundor_wasm_channel_*), so the processor ABI version is unchanged.

  • #321 b7dbe5f Thanks @dm-balakin! - Breaking (processor ABI 2): the Rust audio processor can read persistent state. A state field declared with audio: true keeps its usual persistence, presets and History, and the processor also reads it as ctx.state in prepare() and process(). ctx.state is a generated soundor::StateSnapshot that holds only the audio: true fields, typed as declared, so reading a UI-only field fails to compile. An audio field is a number, a boolean, or an array of them with a maxLength (StateArray<T, N>, which reads as a slice). maxLength is an array's capacity. Any array field may declare one, and every value of the field is checked against it on every write path (sets, restored projects, factory presets, History).

    A change reaches the next block. A block sees one snapshot from start to end, and fields written together arrive together. Reading takes no lock, allocates nothing and copies nothing. Natively, the engine's processor::AudioState (a triple buffer that PersistentState::audioState() owns) hands snapshots to the audio thread. In the browser, the page posts each snapshot to the AudioWorklet (ProcessorNode.setState()), which writes it into the module between render quanta.

    The processor ABI is now version 2: SoundorPrepare and SoundorBlock carry the state, and SoundorProcessorInfo and RustContract its size. Rebuild a plugin's processor with this SDK. TestProcessor::state_mut() sets the state in tests.

  • #328 3f303a0 Thanks @dm-balakin! - Remove the soundor init command and runtime initialization hook. Runtime authors now implement only gen, dev, build, and doctor. Both first-party hosts remain package-managed, including the legacy-host migration diagnostics.

    soundor gen creates a Rust starter crate when lib/Cargo.toml is absent, preserving existing files and leaving existing crates untouched; development and builds run it automatically. Check mode remains read-only. New projects run generation after dependency installation.

  • #306 84678d1 Thanks @dm-balakin! - Rename soundor:state-history to soundor:history, its stateHistory export to history, and its StateHistory interface to History. Rename the React hook to useHistory and the generated JUCE processor member to history. Update imports, hook calls, and native member access to the new names.

  • #307 3734cf5 Thanks @dm-balakin! - Breaking: the Web runtime runs the plugin's Rust processor, lib/, the one the JUCE plugin runs: soundor dev web and soundor build web compile it with Cargo for wasm32-unknown-unknown, the bundle carries the module, and the host runs it in an AudioWorklet (no wasm-bindgen, no SharedArrayBuffer, render quanta of any length), with the parameters and the transport posted to it and what it publishes (read-only parameters, native streams) brought back to the UI. startSoundorWebHost() no longer takes audio, and WebAudioSetup is gone: delete runtimes/web/src/audio.ts and move its processing into lib/. init no longer scaffolds audio.ts, and soundor doctor checks for the wasm32-unknown-unknown target. The Rust SDK's soundor::export! also defines the WebAssembly exports the worklet calls (soundor_wasm_*), on that target only. createProcessorNode() runs a processor module in any BaseAudioContext.

  • #331 f28464c Thanks @dm-balakin! - Breaking: the plugin's Rust processor and controller library now lives in lib/. Rename native/ to lib/, update Cargo manifest paths in scripts and tooling, and run soundor gen. Legacy and ambiguous layouts produce a migration error without changing user files.

    Runtime authors must use ctx.lib, LibraryBuildContext, LibraryBuildRequest, and LibraryArtifact in place of the Rust crate's native-named context and types. Cargo options, processor/controller ABI, and the public soundor:native methods/events API are unchanged. Both JUCE and Web compile the same library for their targets.

  • #319 ada8d88 Thanks @dm-balakin! - The engine's WebAssembly comes from the installed @soundor/engine's prebuilt release (engine({ target: 'web' })), downloaded once into the Soundor cache and verified when soundor dev or soundor build first needs it: a web plugin needs no Emscripten, CMake or C++ compiler. The page still loads it from the application's own assets. SOUNDOR_ENGINE_WASM still names a module to use instead, now checked to be the engine's and to speak the installed version's protocol.

  • #318 1cd9728 Thanks @dm-balakin! - The web runtime's soundor:ui is now the engine itself (@soundor/engine/web): its C++ core, compiled to WebAssembly, holds the node tree, reads styles and lays out with Yoga and its text engine, and its DOM adapter draws with HTML elements and CSS. The runtime's own TypeScript copy of the engine (its Yoga mapping, style checks, text layout and node tree) and its dependency on @soundor/yoga-wasm are gone: a page loads one engine module, served by soundor dev and emitted as an asset by soundor build. Plugins need no change; style errors now read exactly as natively. The module is built from the engine's sources (pnpm --filter @soundor/engine build:wasm) and is not yet published: outside the Soundor repository, SOUNDOR_ENGINE_WASM names one.

Patch Changes

  • #301 523dacc Thanks @dm-balakin! - Clean up lint warnings and update callback references after React commits, keeping installed listeners stable.

  • #307 6c7e0d9 Thanks @dm-balakin! - Add allocation instrumentation to the Rust processor testing harness and the scaffold's tests. Count allocator calls only while processing, with a required counting allocator so missing instrumentation cannot pass silently. Exercise the Rust SDK, native FFI, JUCE adapter and example processors; compare Orbit's real VST3 output with its WebAssembly build. Document the shared Rust processor lifecycle, generated config contract, Cargo dependencies, runtime boundaries, testing and migration.

    Reuse prepared WebAssembly parameter, transport and channel views during processing, including partial and oversized blocks. Preallocate the worklet's channel arrays and silence missing inputs without allocating fallback buffers. Unexpected WASM memory growth fails silently instead of rebuilding views in the callback. Browser publication messages still allocate; these checks do not claim a hard real-time guarantee.

  • #344 49d772d Thanks @dm-balakin! - Size the web host to the dynamic viewport so mobile browser toolbars do not create an extra page scroll area.

On this page