sdif-sys

Crates.iosdif-sys
lib.rssdif-sys
version0.5.2
created_at2025-12-05 23:38:48.823599+00
updated_at2025-12-06 08:31:35.188393+00
descriptionRaw FFI bindings to the IRCAM SDIF (Sound Description Interchange Format) C library
homepage
repositoryhttps://github.com/oxur/sdif
max_upload_size
id1969403
size4,372,354
Duncan McGreggor (oubiwann)

documentation

README

sdif-sys

Crates.io Documentation

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:

  1. Installed system-wide (recommended), OR
  2. 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:

cargo build

The build script will use pkg-config to find the library.

Using Bundled Source

To compile SDIF from source:

  1. Download the SDIF source (see sdif/README.md)
  2. Build with the bundled feature:
cargo build --features bundled

Static Linking

For static linking:

cargo build --features static

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

Commit count: 0

cargo fmt