Open-source audio framework for Rust
Tested, not promised.
Manguebyte builds audio plugins and applications in Rust: DSP and instruments, metering, MIDI, files, devices, plugin editors and hosting, and native CLAP, VST 3, LV2 and Audio Unit export from one line each. Its goal is to be for Rust what JUCE is for C++, and then to go further. Every claim on this site links to the test that proves it.
Version 0.2.0, on crates.io. The project is young and the API will change before 1.0. Plugin editors open in Win32 windows and are tested in CI; by hand, one has been opened in a host so far, Mangue Pluck’s in REAPER. See what is missing.
Green on every commit
These are real tests and validator results, not a mock-up. All of them passed in CI at commit 46ec338. Follow any line to the code.
cargo test --workspace
- pluginautomation_
lands_ okon_ its_ exact_ frame_ and_ updates_ the_ parameter - manguebytethe_
song_ okis_ the_ same_ whatever_ the_ block_ size - dspprocessors_
do_ oknot_ use_ the_ heap - pluginchanges_
made_ okoutside_ the_ host_ reach_ the_ plugin_ as_ events - dspexpression_
and_ okmodulation_ reach_ one_ note_ and_ parameters_ reach_ all - paramsstate_
from_ okanother_ version_ loads_ as_ far_ as_ it_ can - clapnumbers_
too_ oksmall_ to_ hear_ are_ zero_ while_ the_ plugin_ runs_ and_ only_ then - hostthe_
hosted_ okplugin_ sounds_ exactly_ as_ the_ plugin_ does_ alone - analysiscases_
1_ okand_ 2_ a_ steady_ tone_ reads_ its_ level_ on_ all_ three_ scales - devicesthe_
song_ okgoes_ on_ while_ the_ device_ changes_ under_ it
01
Four things it proves on every commit
Matching JUCE is the baseline. These are places where Manguebyte already does something JUCE 9.0.4 does not, each one backed by a test that runs in CI. The full list has seventeen, with a source for everything said about JUCE and the limit of every claim.
-
Automation lands on the exact sample
Every parameter change arrives with the frame it falls on and is applied on that frame: in the test harness, through CLAP, and through VST 3, where every point of every automation queue is delivered.
- In JUCE 9.0.4
- A processor reads each parameter once per block.
- Limit
- A processor chooses whether to use the timing. Reading a value once per block is still valid, and cheaper.
Proof
-
The same sound at any block size
One song rendered with six block patterns, from a steady 64 frames to an irregular
1, 511, 7, 300, 64, 2, 129, must match bit for bit. The first time this test ran, it failed, and exposed a real bug.- In JUCE 9.0.4
- Whether the sound depends on the host’s buffer size is up to each plugin.
- Limit
- It covers what follows events. A value read once per block changes at block boundaries by definition.
Proof
-
No heap on the audio thread, or CI fails
The tests replace the global allocator with one that counts. If any processor, or the CLAP wrapper, allocates or frees while processing, the build is red. It has already caught a mutex that allocates on macOS.
- In JUCE 9.0.4
- Real-time safety is a rule in the documentation.
- Limit
- A test that runs, not a compile-time proof. It catches heap use on the paths the tests exercise.
Proof
-
CLAP and VST 3 from one line each, checked by their own validators
export_clap!andexport_vst3!turn the same plugin into both formats. CI runs the CLAP project’s validator and Steinberg’s on an instrument and an effect, and neither fails a test; all 537 of Steinberg’s pass on Windows, Linux and macOS, its double-precision tests included. Both were also tested by hand in REAPER, andexport_lv2!andexport_au!add LV2 and Audio Units, which pass Apple’sauvalin CI.- In JUCE 9.0.4
- CLAP export is not available natively.
- Limit
- Editors are tested in CI; by hand, only Mangue Pluck’s CLAP editor has been opened in a host. LV2 has run in no host but the framework’s own, and no DAW has loaded the Audio Units yet. No AUv3 or AAX.
Proof
02
A whole plugin, then one line per format
This is the example effect from the repository: a sidechain ducker. It describes itself, splits each block at its events, and is exported in four formats. None of the code below was written for this page.
One description
INFOandLAYOUTare constants. The same description becomes the CLAP descriptor, the VST 3 class, whose id is the same on every platform, the LV2 plugin’s Turtle files, and the Audio Unit’s codes, which are hashed from the plugin’s id.Events on their frame
split_at_eventsrenders up to each event, applies it and carries on, without copying or allocating. That call is all a plugin does to get sample-accurate automation.Four formats, four lines
The macros are the whole integration, and
editorhands the wrappers the plugin’s editor.cargo manguethen builds a.clap, a.vst3and an.lv2bundle in each system’s layout, and on a Mac a.component.
impl Plugin for Duck {
const INFO: PluginInfo = PluginInfo {
id: "org.manguebyte.duck",
name: "Mangue Duck",
vendor: "Manguebyte",
version: env!("CARGO_PKG_VERSION"),
description: "A sidechain ducker, as an example of the Manguebyte framework",
kind: PluginKind::Effect,
};
const LAYOUT: AudioLayout = AudioLayout {
inputs: 2,
outputs: 2,
sidechain: 2,
};
type Params = DuckParams;
// ... new, params and prepare are left out here
fn process(&mut self, buffer: &mut AudioBuffer<f32>, context: &ProcessContext<'_, f32>) {
self.cursor = 0;
let sidechain = context.sidechain;
split_at_events(self, buffer, context.events, Self::handle, |duck, piece| {
duck.render(piece, sidechain)
});
self.publish_reduction();
}
// ... reset
fn editor(&self) -> Option<Box<dyn EditorSpec>> {
Some(Box::new(self.editor_spec()))
}
// ... tail_samples
}
manguebyte::clap::export_clap!(Duck);
manguebyte::vst3::export_vst3!(Duck);
manguebyte::lv2::export_lv2!(Duck);
manguebyte_au::export_au!(Duck);
46ec338. Lines beginning // ... mark what is left out.And a test of it, with no host
Harness plays audio, a sidechain and automation into the plugin inside an ordinary unit test. This one checks that a change of depth lands on frame 1,000 of the block, and not one frame earlier.
#[test]
fn automation_lands_on_its_frame_with_audio_running_through() {
let mut harness = Harness::<Duck>::new(RATE, 256);
let input = steady(1.0, 24_000);
let loud = steady(1.0, 24_000);
// Let the follower settle, then ask for a different depth on one
// particular frame in the middle of a block.
harness.process_with_sidechain(&input, &loud);
harness.automate(24_000 + 1_000, "depth", 24.0);
let output = harness.process_with_sidechain(&input, &loud);
let before = db_to_gain(-12.0) as f32;
let after = db_to_gain(-24.0) as f32;
assert!((output.channel(0)[999] - before).abs() < 1e-4);
assert!((output.channel(0)[1_000] - after).abs() < 1e-4);
}
46ec338, as it is in the file.03
What you get today
Twenty-seven crates that work together, each usable on its own, one of them a command-line tool. All of them are on crates.io as version 0.2.0, with their documentation on docs.rs. manguebyte-core has no dependencies at all.
-
Core
The types everything else is built on. This crate has no dependencies at all.
-
Signal processing
A tuple of processors is a processor: the chain is resolved at compile time, with no virtual calls and no allocation.
-
Instruments
Voices ready to play, each with presets, answering velocity and accents, their tuning or spectra measured in tests. They are brought to one loudness in the browser engine, not in
manguebyte-dspitself. -
Metering and analysis
Meters that run on the audio thread and that any thread reads without waiting.
-
Processing graph
A graph that is rewired while it plays.
-
Parameters
Parameters are atomics in a struct. There are no listeners.
-
Application state
What an editor edits, undoes and saves, and hands to the audio thread. There are no listeners here either. No example plugin’s editor uses it yet, and it has not been in a DAW.
-
Plugins
Write a plugin once. Export it as CLAP, VST 3, LV2 and, for macOS, an Audio Unit with one line each, run it as an application, and test it with no host.
manguebyte-pluginmanguebyte-clapmanguebyte-vst3manguebyte-lv2manguebyte-aumanguebyte-standalone -
Editors and interfaces
Editors and application windows drawn on the CPU, opened in a child of the host’s window or in a window of their own, on Win32 so far, and tested in CI. By hand, Mangue Pluck’s CLAP editor has been opened in REAPER on Windows.
manguebyte-gfxmanguebyte-uimanguebyte-windowmanguebyte-gui -
Hosting plugins
Load plugins made by anyone and run them as processors, and find the ones installed.
-
Sampler
An SFZ player, open so that any program can play the instruments it is given.
-
In the browser
An engine for a browser’s AudioWorklet, and the sound engine Aratu plays through. Tested natively and in Node.js, its demo tried once in Chromium, not yet in a browser’s audio thread under load.
-
MIDI
MIDI 1.0 and 2.0, with timing kept to the sample.
-
Audio files
Read and write whole files or block by block, from disk to the audio thread, with codecs written from their specifications.
-
Open Sound Control
Messages from controllers and live-coding programs, on the frame they ask for.
-
Devices
Sound cards and MIDI ports, and an engine that plays on while the device changes under it.
-
ASIO, under the GPLv3
Opt-in, and the one crate under the GPLv3 rather than MIT or Apache-2.0. Not part of the facade, and no other crate depends on it.
-
Command-line tool
From an empty folder to an installed plugin.
cargo install cargo-mangueinstalls it.
04
Where JUCE is ahead
JUCE has more than twenty years of production use behind it, and far more breadth. Today it has, and Manguebyte does not:
- a complete GUI toolkit, with plugin editor windows on macOS and Linux as well as Windows (Manguebyte’s editors open on Windows only so far, and only one has been opened by hand in a DAW);
- the AUv3 and AAX plugin formats, and Audio Units checked in real hosts (Manguebyte’s AUv2 wrapper has only its own tests and
auvalin CI); - the editors of hosted plugins on every system (Manguebyte hosts CLAP, VST 3, LV2 and Audio Unit plugins and scans for them; the editors of hosted CLAP and VST 3 plugins open in tests on Windows only, and no LV2 or AU editor is hosted);
- SIMD wrappers and lookup tables among its DSP utilities;
- iOS and Android (Manguebyte’s audio and device crates are built for both in CI, but not run on a device);
- documentation, tutorials and a large community.
The roadmap says what exists and in what order the gap is being closed.
05
The Manguebyte ecosystem
Four more projects from Recife grow from the same mangue, built to run on Manguebyte.
-

This framework
Manguebyte
The open-source audio framework for Rust, under MIT or Apache-2.0, released on crates.io. Aratu already plays on its browser engine, and its Aratu Bridge plugin plays the same music in a DAW; Caecilia and Parabolic are built on it.
-

In development
Aratu
A live-coding language that reads like music: measures, beats and note values first, in Portuguese, Spanish and English. Its editor runs in the browser and plays on Manguebyte.
-

Alpha
Caecilia
A virtual pipe organ written in Rust on Manguebyte: a program of its own and VST3 and CLAP plugins.
-

In development
Parabolic
A tool for musicians to turn their own sounds into plugins and samplers without writing code.
-

In design
MARÉ
Multi-device Audio Realtime Exchange: an open protocol for low-latency audio and MIDI, to replace ASIO. Many programs on one device at once, many devices as one, MIDI 2.0 on the same clock.
Built on it by others
-
By cloudbeer · Apache-2.0
muser
A headless music-arrangement engine built for AI agents. An agent writes the project as JSON, through a command-line tool or an MCP server, and muser turns it into audio on Manguebyte, which synthesizes its more than 100 built-in instruments. Playing live and rendering to a WAV file share the same code and come out sample for sample the same.
06
Crabs with brains
The name comes from Recife, the city in the north-east of Brazil where this project was born. Recife is built on mangroves, mangue in Portuguese.
In the early 1990s a group of local musicians answered the city’s troubles with a manifesto, Caranguejos com Cérebro, “Crabs with Brains”: plug the rich, muddy roots of the region’s culture into the global network of ideas. The image they chose was a satellite dish stuck in the mangrove mud.
Start with one dependency
Manguebyte is on crates.io, with its documentation on docs.rs:
[dependencies]
manguebyte = "0.2"
46ec338, as it is in the file.Or install the command-line tool and let it write a plugin crate for you:
cargo install cargo-mangue
cargo mangue new my-gain
46ec338, as it is in the file.