19 releases

0.5.8 Oct 11, 2025
0.5.7 Jun 12, 2025
0.5.5 Jan 21, 2025
0.5.4 Dec 14, 2024
0.2.2 Nov 13, 2018

#237 in Audio

Download history 167/week @ 2025-09-20 184/week @ 2025-09-27 248/week @ 2025-10-04 608/week @ 2025-10-11 358/week @ 2025-10-18 201/week @ 2025-10-25 146/week @ 2025-11-01 139/week @ 2025-11-08 125/week @ 2025-11-15 235/week @ 2025-11-22 220/week @ 2025-11-29 372/week @ 2025-12-06 403/week @ 2025-12-13 371/week @ 2025-12-20 431/week @ 2025-12-27 276/week @ 2026-01-03

1,544 downloads per month
Used in 15 crates (8 directly)

BSD-3-Clause

21MB
595K SLoC

C 577K SLoC // 0.0% comments Shell 8K SLoC // 0.2% comments M4 7.5K SLoC // 0.2% comments GNU Style Assembly 1K SLoC Rust 689 SLoC // 0.0% comments Automake 418 SLoC // 0.1% comments Perl 264 SLoC // 0.2% comments Python 77 SLoC // 0.2% comments

Contains (autotools obfuscated code, 530KB) opus/configure, (obscure autoconf code, 41KB) opus/configure.ac

opusic-sys

Rust Crates.io Documentation

Bindings to libopus

Target version 1.5.2

This crate has the same license requirements as C source code.

All modifications to the source code are described in opus.patch

Setup

By default, libopus is bundled, this can be deactivated using default-features=false. To explicitly enable bundling, enable feature bundled.

If feature bundled is not enabled, then by default $PATH is searched for libopus. Alternatively, environment variable OPUS_LIB_DIR can be set to link against a specific library. (ex. /usr/lib)

You can specify environment variable OPUS_LIB_STATIC=true to indicate preference for static linkage during dynamic lookup

Android build

When building for android, library requires presence of env variable ANDROID_NDK_HOME in order to supply cmake with toolchain file and correct target arch.

Re-generate bindings

The feature build-bindgen is used to generate bindings.

To use it set env variable LIBCLANG_PATH to directory that contains clang binaries

Requirements

  • cmake - when building with bundled feature

Optional

  • ninja - When present, build script, if bundled feature enabled, defaults to use corresponding CMake's generator

Dependencies