Writing an Audio Plugin in Rust


Hi all! I just posted a tour/tutorial of the vst2 crate on my website - I was seriously blown away by how simple it was to get something up and running with it, felt like I should spread the word :slight_smile:


I’m still quite new to both Rust and audio programming - let me know if there’s any glaring flaws or obvious improvements to be made in my code!

TWiR quote of the week

Nice tutorial, I am glad that you’re demonstrating Rust’s utility in the music scene!

I sent the link to a musician friend of mine, who is semi-technical, but would never dare to touch C; I’m betting he’ll be thrilled!


Thank you! It seems like there’s a decent community around audio/music in Rust that I wasn’t aware of (several people have directed me to #rust-music on IRC since I wrote this tutorial), so I’m super excited to get involved.

Let me know how your friend gets on! :slight_smile:

(also, super flattered by the nomination for quote of the week, that’s made my day!)


Wonderful timing on this–I’ve begun learning how to develop audio applications and plugins myself over the last couple of weeks using JUCE. As much as I enjoy the brain exercise from revisiting C++, my long-term dream would be to write these things in Rust and spread the good word there.

Regarding the shell script you linked, that’s for creating a VST2 bundle in the format that OSX/MacOS expects them in, not turning them into Audio Units (Apple’s plugin format for Logic, Garageband, etc.), right? It looks like there’s some bindings for those in the coreaudio-sys crate, at least. Furthermore, it looks like the only VST-oriented crate is vst2, but do you know whether anyone’s begun a VST3 implementation in Rust? Are there any major technical or licensing/IP hurdles that make VST3 in Rust impractical?


I’ve heard pretty good things about JUCE! May try it out, if I hit the limits of what’s doable with the Rust libraries so far.

Yeah, as far as I can tell the script is just a VST bundler, rather than doing any sort of conversion. I’m very much not a Mac person, so I’m the wrong person to ask about the state of Audio Unit support in the Rust world :stuck_out_tongue: I imagine the approach to writing a high level wrapper over coreaudio-sys wouldn’t be too different from what overdrivenpotato’s done with vst2, though?

In terms of VST3 stuff - I have no clue why there doesn’t seem to be any libraries for that in Rust. I’m very much a beginner when it comes to audio software development, so if there’s any glaring technical/legal issues preventing it from happening I’m ignorant of them.