Project Setup
This guide walks through setting up a JUCE plugin project with Rust DSP.
Directory Structure
A typical project structure:
my-plugin/
├── CMakeLists.txt
├── dsp/ # Rust DSP crate
│ ├── Cargo.toml
│ ├── include/
│ │ ├── bbx_ffi.h # C FFI header
│ │ └── bbx_graph.h # C++ RAII wrapper
│ └── src/
│ └── lib.rs # PluginDsp implementation
├── src/ # JUCE plugin source
│ ├── PluginProcessor.cpp
│ ├── PluginProcessor.h
│ ├── PluginEditor.cpp
│ └── PluginEditor.h
└── vendor/
└── corrosion/ # Git submodule
Prerequisites
- Rust toolchain - Install from rustup.rs
- CMake 3.15+ - For building the plugin
- JUCE - Framework for the plugin
- Corrosion - CMake integration for Rust
Adding Corrosion
Add Corrosion as a git submodule:
git submodule add https://github.com/corrosion-rs/corrosion.git vendor/corrosion
Next Steps
- Rust Crate Configuration - Set up
Cargo.toml - CMake with Corrosion - Configure the build system