sdif-sys
Raw FFI bindings to the IRCAM SDIF (Sound Description Interchange Format) C library.
⚠️ Important Note
This crate is published as a placeholder on crates.io. When downloaded from crates.io without the SDIF C library installed, it will compile with stub bindings that provide the type definitions but no actual functionality. The stub functions will link but cannot be called at runtime.
To use this crate, you must have the SDIF C library available either:
- Installed system-wide (recommended), OR
- As bundled source (see below)
Overview
This crate provides low-level, unsafe bindings to the SDIF library. For most use cases,
you should use the sdif-rs crate which provides a safe, idiomatic Rust API.
Building
Using System Library (Recommended)
If you have SDIF installed system-wide:
The build script will use pkg-config to find the library.
Using Bundled Source
To compile SDIF from source:
- Download the SDIF source (see
sdif/README.md) - Build with the bundled feature:
Static Linking
For static linking:
Requirements
- Rust 1.70 or later
- clang (for bindgen)
- pkg-config (for system library detection)
- SDIF C library (system or bundled)
Safety
All functions in this crate are unsafe. The SDIF library:
- Requires initialization before use (
SdifGenInit) - Uses global state (not thread-safe)
- Requires specific call sequences for reading/writing
License
MIT License - see LICENSE file.
See Also
- sdif-rs - Safe Rust wrapper
- SDIF Specification
- IRCAM SDIF