rodio 0.22.2 splits output from decoding while its examples stay pinned to an older commit
Rust audio playback library
At a glance
- What is it?
- rodio hands every sound out to cpal and every file in to Symphonia, so the crate's real behaviour is decided by Cargo.toml feature flags rather than by the write-up. The manifest is at 0.22.2, the dependency snippet asks for 0.22.1, and the examples directory is frozen at commit f7aa48d because the core engine is mid rewrite.
- Who is it for?
- rodio is a sensible base when you want Rust to own the decode path and cpal to own the device, and the feature flags let you strip playback out entirely when there is no output to speak of. Before you commit to it, read the version numbers yourself: the dependency snippet asks for 0.22.1, the manifest says 0.22.2, and the upgrade guide on the default branch is written for 0.21.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 43 days ago.
- What is it written in?
- Mainly Rust, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 23, 2026, and from our analysis. They are not legal advice.
Star history
- RustAudio/rodio2,520 ★ · +42
| Repository | 2026-09-30 | 2026-11-23 |
|---|---|---|
| RustAudio/rodio | 2.5k | 2.5k |
42 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Every sound leaves through cpal, so the manifest holds the real design
rodio does not touch audio hardware itself. Playback and recording are both delegated to cpal, and in the manifest those two features are thin wrappers over that single dependency: `playback = ["dep:cpal"]` and `recording = ["dep:cpal", "dep:rtrb"]`. The extra crate in the recording line is rtrb, a real-time ring buffer, which is how captured samples travel from the audio thread without allocating on it. Writing a sound file is a separate matter again. `wav_output = ["dep:hound"]` is not in the default set, so a default build decodes WAV and will not write one. The default list is short enough to read in one breath: playback, recording, flac, mp3, mp4, vorbis, wav, pulseaudio, simd. Everything else in the feature table waits for you to ask, including tracing, dither, noise, 64bit, experimental, realtime, realtime-dbus, and the Windows ASIO line that forwards to `cpal/asio` plus an audio worklet line for WebAssembly whose contents are not shown. The stated goals match that structure: you should not need to know anything about audio to use rodio, it should be a zero cost abstraction, and it should offer options between perfect and fast.
Four named decoders, five default formats, and a SIMD switch that only reaches the decoder
Format decoding goes to Symphonia by default. The optional decoders it can be swapped for are named one by one: FLAC by claxon, MP3 by minimp3, Vorbis by lewton, WAV by hound. Count the default feature list against that list and the arithmetic does not close. The defaults enable flac, mp3, mp4, vorbis and wav, so mp4 ships on while no decoder is named for it, and the examples tree carries music_m4a.rs and music_opus.rs without either format appearing in the decoder paragraph. The same asymmetry sits in the performance switch. `simd = ["symphonia/opt-simd"]` forwards one flag and stops there, so a default build turns on vectorised decoding and leaves rodio's own mixing, buffering and resampling as the compiler found them. The examples directory holds 24 files whose names map back to that feature table: microphone.rs for the recording path, noise_generator.rs for the noise feature, resample.rs, seek_mp3.rs, mix_multiple_sources.rs, automatic_gain_control.rs, limit_settings.rs, error_callback.rs, callback_on_end.rs and custom_config.rs.
Two different commits are pinned in the same file while the engine is rewritten
The opening block is a warning, not a tagline. The core audio engine is being rewritten, the current state should be working but under documented, and the work is expected to take at least a month. That block points at a checkout at commit c5f1e94290922fe4ee963ce6f85754ea6ba36243 for the latest unreleased pre-rewrite work, and at issue 901 for progress. Further down, a separate paragraph freezes the examples at a different commit, f7aa48daa08a303e247d68a1dad0dbcc915ca135, on the grounds that examples do not work with the current crates.io release. Two pinned commits in one file, neither of them a tag. This project has no GitHub releases at all, so the version numbers that matter come from the manifest and from crates.io, while the code you are invited to read as reference sits deliberately behind the code you get by adding the dependency. The root also carries codebook.toml, flake.nix, .envrc, benches/, outreach/ and rustfmt.toml, none of which the top-level write-up explains.
The dependency snippet asks for 0.22.1 while the manifest is at 0.22.2
Copy the dependency block from the write-up and you pin a different release than the repository currently carries. The snippet reads:
[dependencies]
rodio = { version = "0.22.1", default-features = false, features = ["symphonia-all"] }while the manifest in the same tree declares version 0.22.2. The same drift shows up in the upgrade guide, which is presented as the path to rodio 0.21, one release line behind the version in that snippet. Three numbers are in play: 0.21 in the upgrade guide, 0.22.1 on the copy-paste line, 0.22.2 in the manifest. That snippet is also the documented route to a decode-only build, with default-features turned off and symphonia-all kept, a configuration that drops cpal and every system requirement cpal carried. It is the documented answer for machines with no audio output at all, and the into_file example is the shape of the work there. The manifest also excludes assets and tests from the published package, so what you get from the registry is narrower than what the tree holds.
On Linux the fallback chain is fixed, and the default host needs the fewest packages
cpal walks a fixed order on Linux and drops down it whenever a host is not compiled in or not present at runtime: PipeWire, then PulseAudio, then ALSA. ALSA sits at the bottom as the base audio layer and is always required, which makes libasound2-dev on Debian or Ubuntu and alsa-lib-devel on Fedora non-optional even if you never intend to touch ALSA directly. Above it, the default choice is the cheapest one. The `pulseaudio` feature is enabled by default and requires no development libraries at all, because the pulseaudio-rs crate is pure Rust. The optional `pipewire` feature gives more direct interfacing with PipeWire systems, and it is the one that does require development libraries, libpipewire-0.3-dev and libdbus-1-dev on Debian or Ubuntu. The dependency bill therefore runs backwards from the usual expectation: moving to the newer host adds system packages, and moving to the default removes them.
Cross-compiling for aarch64 means outrunning ALSA, or dropping playback entirely
Cross-compiling runs straight into that base layer. rodio depends on the ALSA library through cpal, which pulls in libasound and libasound-dev, and that is what makes cross-compiling hard. The cpal guides cover other targets but say nothing about aarch64, so the rodio side supplies five steps for Debian-like systems:
sudo apt-get install crossbuild-essential-arm64 clang
rustup target add aarch64-unknown-linux-gnu
sudo dpkg --add-architecture arm64
sudo apt install libasound2-dev:arm64
PKG_CONFIG_SYSROOT_DIR=/usr/aarch64-linux-gnu RUSTFLAGS="-C linker=aarch64-linux-gnu-gcc" cargo build --target aarch64-unknown-linux-gnuThe multi-arch install is the step that does the real work, giving pkg-config something to find for the target architecture, while the sysroot and linker pair tell cargo where to look and what to drive. The commands are said to work for other Linux targets too if you change the architecture and multi-arch packages exist, and for anything not Debian-like, or for a build you have to repeat, cross is the pointer to follow. The same ALSA requirement is the reason the decode-only configuration exists at all.
The 64-bit switch sits past the hardware floor the requirements state
The hardware requirement is stated plainly: the target CPU should have hardware support for 32-bit floating point and atomic operations at least 32 bits wide, and without those it may not be fast enough to keep up with real time. Then the manifest offers `64bit = []`, which performs all calculations with 64-bit floats instead of 32, and `experimental`, built on atomic floating point operations through the atomic_float crate. Turning on the first is a step beyond the documented floor rather than a safer setting, and the second is labelled experimental in the manifest itself. Scheduling is opt-in in two different flavours. `realtime = ["cpal/realtime"]` leaves you to make sure rtprio has been granted to you, while `realtime-dbus = ["cpal/realtime-dbus"]` lets rtkit arrange the necessary limits over D-Bus on typical desktop systems. Neither is in the default list, so a default build gets no priority boost and no warning that it wanted one.
Dual licence in the files, Apache-2.0 in the field, and a floor of Rust 1.95
Licensing is stated three ways and the statements do not line up. The manifest says `MIT OR Apache-2.0`, the write-up offers the Apache License Version 2.0 or the MIT licence at your option, and both LICENSE-APACHE and LICENSE-MIT sit at the tree root, while the project's licence field reads Apache-2.0 on its own. With both files present, the dual grant is what decides what a downstream user may do, and choosing between them is the consumer's call rather than something the repository settled for you. The toolchain floor is equally concrete once you know where to look: a rolling MSRV policy of at least six months is stated, together with the rule that any increase must go to a Rust release at least six months old, but no version is ever named. The manifest names it, rust-version 1.95, next to edition 2021. One line is worth reading before writing code against the crate: if you are considering generative AI, the contributing section asks you to look at RustAudio's AI policy first.
Editorial conclusion
rodio is a sensible base when you want Rust to own the decode path and cpal to own the device, and the feature flags let you strip playback out entirely when there is no output to speak of. Before you commit to it, read the version numbers yourself: the dependency snippet asks for 0.22.1, the manifest says 0.22.2, and the upgrade guide on the default branch is written for 0.21. The engine rewrite means the pinned example commit is the one that matches the published crate, so treat the examples as historical reference rather than current API. On Linux, decide up front whether you want PipeWire, because that optional feature is the one that adds development packages while the default PulseAudio path adds none.
Frequently asked questions
What does rodio decode audio with in a default build?
Symphonia by default, with optional format-specific decoders named for FLAC (claxon), MP3 (minimp3), Vorbis (lewton) and WAV (hound). The default feature list enables flac, mp3, mp4, vorbis and wav, so mp4 ships enabled even though no decoder is named for it.
Does rodio need system audio libraries on Linux?
Yes. ALSA is always required as the base audio layer, libasound2-dev on Debian or Ubuntu and alsa-lib-devel on Fedora. The default pulseaudio feature needs no development libraries because pulseaudio-rs is pure Rust, while the optional pipewire feature needs libpipewire-0.3-dev and libdbus-1-dev.
Why are the rodio examples pinned to a commit instead of a tag?
Because the core audio engine is being rewritten. The write-up freezes the examples at commit f7aa48daa08a303e247d68a1dad0dbcc915ca135, points at a separate pre-rewrite checkout for the latest unreleased work, and tracks progress on issue 901. There are no GitHub releases, so that pinned commit is the reference for the version the manifest declares.
Which Rust version does rodio require?
The manifest sets rust-version 1.95 with edition 2021. The stated policy is a rolling floor of at least six months, and any increase has to move to a Rust release that has itself been out for at least six months.
Which licence applies to rodio?
The manifest declares MIT OR Apache-2.0 and the write-up offers either at your option, with LICENSE-APACHE and LICENSE-MIT both present at the tree root. The project's own licence field reads Apache-2.0 alone, which understates the dual grant.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/rustaudio-rodio)Star history chart for your README
[](https://hysenlabs.com/projects/rustaudio-rodio)Was this useful?