Safe and Sound
Using C++ Audio Libraries from Rust
Rust is a systems programming language that offers strong safety guarantees, fearless concurrency, and real-time performance. It's a great fit for writing audio applications, but many of the mature libraries in this space are written in C++. How can we bridge this gap and use these C++ audio libraries in Rust?
In this talk, we will explore techniques for integrating C++ libraries into Rust applications without sacrificing performance or ergonomics. We'll use Rust's Foreign Function Interface (FFI) to build low-level bindings to C++ libraries, and show how tools like cxx can streamline the process. We'll then layer on a safe, idiomatic Rust interface that leverages the type system, borrow checker, and traits to create expressive and ergonomic APIs. Along the way, we will look at examples from real-world audio libraries like Cmajor and JUCE, highlighting how to handle common challenges and guide correct usage through the type system.
Attendees will leave with practical techniques for wrapping C++ libraries safely in idiomatic Rust, with a focus on the specific challenges of audio libraries.

James Hallowell
James is a Senior Software Developer at Focusrite, working on internal tools and libraries.