13 releases (3 stable)
| 4.7.1-rc.1 | Aug 25, 2025 |
|---|---|
| 4.7.0 | Aug 23, 2025 |
| 4.6.2-fmodwwise.2 | Apr 16, 2025 |
| 4.6.0 | Mar 8, 2025 |
#1042 in Audio
63 downloads per month
Used in 5 crates
(2 directly)
240KB
644 lines
audionimbus-sys
Rust bindings to the Steam Audio library.
This crate is not meant to be used directly; most users should use audionimbus, a safe wrapper built on top of audionimbus-sys.
Overview
audionimbus-sys exposes raw bindings to the Steam Audio C library.
It is inherently unsafe, as it interfaces with external C code; for a safe API, refer to audionimbus.
audionimbus-sys can also integrate with FMOD studio and Wwise.
Version compatibility
audionimbus-sys mirrors the version of Steam Audio.
Installation
Automatic Installation (Recommended)
The easiest way to use audionimbus-sys is with automatic installation. This will automatically download and set up the required Steam Audio libraries for your target platform.
Requirements
- curl or wget (for downloading)
- Clang 9.0 or later
Basic Usage
Add audionimbus-sys to your Cargo.toml with the auto-install feature:
[dependencies]
audionimbus-sys = { version = "4.7.1-rc.1", features = ["auto-install"] }
With FMOD Studio Integration
[dependencies]
audionimbus-sys = { version = "4.7.1-rc.1", features = ["auto-install", "fmod"] }
You also need to set the FMODSDK environment variable to the path of the FMOD SDK installed on your system (e.g. export FMOD="/path/to/FMOD").
With Wwise Integration
[dependencies]
audionimbus-sys = { version = "4.7.1-rc.1", features = ["auto-install", "wwise"] }
You also need to set the WWISESDK environment variable to the path of the Wwise SDK installed on your system (e.g. export WWISESDK="/path/to/Audiokinetic/Wwise2024.1.3.8749/SDK").
How It Works
When you build your project with the auto-install feature, the build script:
- Automatically detects your target platform and architecture
- Downloads the appropriate Steam Audio release zip file (cached to avoid re-downloading)
- Extracts only the required shared libraries for your platform
- Sets up the library search paths automatically
The downloaded files are cached in $OUT_DIR/steam_audio_cache and won't be re-downloaded unless the version changes.
If you need to force a re-download, you can delete this directory.
Note The initial download can be quite large (≈180 MB for Steam Audio, ≈140 MB for the FMOD integration ≈52MB for the Wwise integration). During this step, cargo build may look like it is stuck - it’s just downloading in the background. The files are cached, so this only happens the first time (or when the version changes).
Manual Installation
If you prefer manual installation or the automatic installation doesn't work for your setup, you can still install Steam Audio manually.
Requirements
Before installation, make sure that Clang 9.0 or later is installed on your system.
Steps
audionimbus-sys requires linking against the Steam Audio library during compilation.
To do so, download steamaudio_4.7.0.zip from the release page.
Locate the relevant library for your target platform (SDKROOT refers to the directory in which you extracted the zip file):
| Platform | Library Directory | Library To Link |
|---|---|---|
| Windows 32-bit | SDKROOT/lib/windows-x86 |
phonon.dll |
| Windows 64-bit | SDKROOT/lib/windows-x64 |
phonon.dll |
| Linux 32-bit | SDKROOT/lib/linux-x86 |
libphonon.so |
| Linux 64-bit | SDKROOT/lib/linux-x64 |
libphonon.so |
| macOS | SDKROOT/lib/osx |
libphonon.dylib |
| Android ARMv7 | SDKROOT/lib/android-armv7 |
libphonon.so |
| Android ARMv8/AArch64 | SDKROOT/lib/android-armv8 |
libphonon.so |
| Android x86 | SDKROOT/lib/android-x86 |
libphonon.so |
| Android x64 | SDKROOT/lib/android-x64 |
libphonon.so |
| iOS ARMv8/AArch64 | SDKROOT/lib/ios |
libphonon.a |
Ensure the library is placed in a location listed in the dynamic library search paths (e.g., /usr/local/lib).
Finally, add audionimbus-sys to your Cargo.toml:
[dependencies]
audionimbus-sys = "4.7.1-rc.1"
Manual FMOD Studio Integration
audionimbus-sys can be used to add spatial audio to an FMOD Studio project.
It requires linking against both the Steam Audio library and the FMOD integration library during compilation:
-
Download
steamaudio_fmod_4.7.0.zipfrom the release page. -
Locate the two relevant libraries for your target platform (
SDKROOTrefers to the directory in which you extracted the zip file):
| Platform | Library Directory | Library To Link |
|---|---|---|
| Windows 32-bit | SDKROOT/lib/windows-x86 |
phonon.dll, phonon_fmod.dll |
| Windows 64-bit | SDKROOT/lib/windows-x64 |
phonon.dll, phonon_fmod.dll |
| Linux 32-bit | SDKROOT/lib/linux-x86 |
libphonon.so, libphonon_fmod.so |
| Linux 64-bit | SDKROOT/lib/linux-x64 |
libphonon.so, libphonon_fmod.so |
| macOS | SDKROOT/lib/osx |
libphonon.dylib, libphonon_fmod.dylib |
| Android ARMv7 | SDKROOT/lib/android-armv7 |
libphonon.so, libphonon_fmod.so |
| Android ARMv8/AArch64 | SDKROOT/lib/android-armv8 |
libphonon.so, libphonon_fmod.so |
| Android x86 | SDKROOT/lib/android-x86 |
libphonon.so, libphonon_fmod.so |
| Android x64 | SDKROOT/lib/android-x64 |
libphonon.so, libphonon_fmod.so |
| iOS ARMv8/AArch64 | SDKROOT/lib/ios |
libphonon.a, libphonon_fmod.a |
-
Ensure the libraries are placed in a location listed in the dynamic library search paths (e.g.,
/usr/local/lib). -
Set the
FMODSDKenvironment variable to the path of the FMOD SDK installed on your system (e.g.export FMOD="/path/to/FMOD"). -
Finally, add
audionimbus-syswith thefmodfeature enabled to yourCargo.toml:
[dependencies]
audionimbus-sys = { version = "4.7.1-rc.1", features = ["fmod"] }
Manual Wwise Integration
audionimbus-sys can be used to add spatial audio to a Wwise project.
It requires linking against both the Steam Audio library and the Wwise integration library during compilation:
-
Download
steamaudio_wwise_4.7.0.zipfrom the release page. -
Locate the two relevant libraries for your target platform and place them in a location listed in dynamic library search paths (e.g.,
/usr/local/lib). -
Set the
WWISESDKenvironment variable to the path of the Wwise SDK installed on your system (e.g.export WWISESDK="/path/to/Audiokinetic/Wwise2024.1.3.8749/SDK"). -
Finally, add
audionimbus-syswith thewwisefeature enabled to yourCargo.toml:
[dependencies]
audionimbus-sys = { version = "4.7.1-rc.1", features = ["wwise"] }
Documentation
Documentation is available at docs.rs.
Since this crate strictly follows Steam Audio’s C API, you can also refer to the Steam Audio C API reference for additional details.
Note that because the FMOD and Wwise integrations depend on files that are local to your system, documentation for the fmod and wwise modules is not available on docs.rs.
However, it can be generated locally using cargo doc --open --features fmod (resp. wwise).
License
audionimbus-sys is dual-licensed under the MIT License and the Apache-2.0 License.
You may choose either license when using the software.
No runtime deps
~0–2MB
~38K SLoC