Rack
A modern Rust library for hosting audio plugins
Status: AudioUnit support is production-ready on macOS (Phases 1-8 complete, thoroughly tested). VST3 support is working on macOS, untested on Windows/Linux (no CI yet). iOS and visionOS are supported but untested. The API is stabilizing. CLAP support is planned.
Rack is a cross-platform library for discovering, loading, and processing audio through VST3, AudioUnit, CLAP, and other plugin formats in Rust applications.
Features
- โ AudioUnit support (macOS, iOS, visionOS) - production-ready with scanning, loading, processing, parameters, MIDI, presets, and GUI
- ๐ง VST3 support (macOS tested, Windows/Linux untested) - scanning, loading, processing, parameters, MIDI, and presets
- โก Zero-copy audio processing - planar format with pointer assignment (no memcpy in hot path)
- ๐ต SIMD-optimized - ARM NEON and x86_64 SSE2 for 4x performance (AudioUnit)
- ๐น Zero-allocation MIDI - SmallVec-based MIDI for real-time performance
- ๐๏ธ GUI support - AudioUnit: AUv3, AUv2, and generic fallback UI (VST3 GUI coming soon)
- ๐๏ธ Clean, safe API - minimal unsafe code, comprehensive error handling
- ๐ผ CLAP support - planned
- ๐ cpal integration - optional audio I/O helpers
- ๐ Zero-cost abstractions - trait-based design
Quick Start
Add to your Cargo.toml:
[]
= "0.3"
List available plugins
use *;
Load and process audio
use *;
MIDI Synthesis
See examples/simple_synth.rs for a complete MIDI synthesis example.
Platform Support
| Platform | AudioUnit | VST3 | CLAP | LV2 | Notes |
|---|---|---|---|---|---|
| macOS | โ | ๐งช | ๐ง | โ | AudioUnit production-ready, VST3 tested & working |
| iOS | ๐งช | โ | โ | โ | AudioUnit compiles, untested |
| visionOS | ๐งช | โ | โ | โ | AudioUnit compiles, untested |
| Windows | โ | ๐งช | ๐ง | โ | VST3 compiles, untested (no CI) |
| Linux | โ | ๐งช | ๐ง | ๐งช | VST3 compiles, untested (no CI) |
- โ Production-ready (tested)
- ๐งช Experimental (compiles, may work, untested)
- ๐ง Planned
- โ Not applicable
Platform-Specific Notes:
- Apple platforms (macOS): AudioUnit is the default and recommended format
- Production-ready: thoroughly tested, SIMD-optimized, with GUI support
- Discovers and loads AUv3 app extensions or AudioUnit plugins
- GUI support: AppKit-based (AUv3/AUv2/generic fallback)
- VST3 also available on macOS (tested & working, but no GUI yet)
- Windows/Linux: VST3 support is experimental
- Code compiles and follows VST3 SDK patterns
- โ ๏ธ NOT tested on Windows or Linux (no CI infrastructure yet)
- Standard VST3 plugin paths are scanned automatically
- Help wanted: testing, CI setup, bug reports
Examples
Run the examples:
# List all available plugins (AudioUnit on macOS, VST3 on Windows/Linux)
# List VST3 plugins specifically
# Process audio with VST3
# Control parameters
# MIDI synthesis
# Browse and load presets
# Plugin GUI (AudioUnit on macOS - shows native plugin UI)
# Real-time audio host with CPAL (requires 'cpal' feature)
Display Plugin GUI
use *;
See examples/plugin_gui.rs for a complete GUI example.
Architecture
Rack uses a trait-based design for maximum flexibility:
This allows different plugin formats to implement the same interface, making your code portable across formats.
Roadmap
AudioUnit (macOS) - โ COMPLETE
- Plugin scanning and enumeration
- Plugin loading and instantiation
- Audio processing with SIMD optimization (ARM NEON + x86_64 SSE2)
- Zero-copy planar audio API (eliminated 2 of 3 memcpy operations)
- Dynamic channel count support (mono/stereo/surround)
- Plugin state reset (clear buffers/delay lines)
- Parameter control with caching
- MIDI support (zero-allocation, all MIDI 1.0 messages)
- Preset management (factory presets + state serialization)
- GUI hosting (AUv3/AUv2/generic fallback)
VST3 (macOS tested, Windows/Linux untested) - ๐งช EXPERIMENTAL
- Plugin scanning and enumeration (automatic system path detection)
- Plugin loading and instantiation
- Audio processing with zero-copy planar audio
- Dynamic channel count support (mono/stereo/surround)
- Plugin state reset (clear buffers/delay lines)
- Parameter control with validation
- MIDI support (zero-allocation, MIDI 1.0 channel messages)
- Preset management (factory presets + state serialization)
- Windows/Linux testing (no CI yet)
- GUI hosting (planned)
Future Formats
- CLAP support (cross-platform)
- LV2 support (Linux)
Advanced Features
- Multi-threading support
- Plugin latency compensation
- Offline processing
- Crash isolation
- Plugin sandboxing
Contributing
Contributions are welcome!
Production-Ready:
- AudioUnit hosting on macOS (Phases 1-8 complete, thoroughly tested)
Experimental (compiles, needs testing):
- VST3 on macOS (tested & working)
- VST3 on Windows/Linux (untested, no CI)
High Priority - Help Needed:
- ๐ด Windows/Linux VST3 testing - verify it actually works!
- ๐ด CI infrastructure - Windows and Linux builds/tests
- ๐ก VST3 GUI hosting
- ๐ก CLAP backend (scanner, loader, processor, GUI)
Lower Priority:
- Linux LV2 support
- Advanced features (multi-threading, latency compensation, crash isolation)
- Documentation improvements
- Additional examples
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Acknowledgments
- Inspired by VCV Rack and the modular synthesis community
- AudioUnit implementation uses Apple's AudioToolbox framework directly via C++ FFI
- VST3 implementation uses the VST3 SDK via C++ FFI
- Thanks to the Rust audio community at rust.audio
Why "Rack"?
The name is inspired by modular synthesizer racks and VCV Rack - the idea of a framework where you can plug in different modules (plugins) and wire them together. Plus, it was available on crates.io! ๐