{"id":24509066,"url":"https://github.com/cijiugechu/libopus_sys","last_synced_at":"2026-01-28T20:39:58.987Z","repository":{"id":263405389,"uuid":"890237792","full_name":"cijiugechu/libopus_sys","owner":"cijiugechu","description":"Rust FFI-binding of Opus.","archived":false,"fork":false,"pushed_at":"2026-01-14T15:38:36.000Z","size":6055,"stargazers_count":2,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-14T19:15:13.893Z","etag":null,"topics":["audio","ffi-bindings","opus-codec","rust"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cijiugechu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-18T08:26:32.000Z","updated_at":"2026-01-14T15:38:41.000Z","dependencies_parsed_at":"2024-11-21T01:17:04.058Z","dependency_job_id":null,"html_url":"https://github.com/cijiugechu/libopus_sys","commit_stats":null,"previous_names":["cijiugechu/libopus_sys"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cijiugechu/libopus_sys","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cijiugechu%2Flibopus_sys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cijiugechu%2Flibopus_sys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cijiugechu%2Flibopus_sys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cijiugechu%2Flibopus_sys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cijiugechu","download_url":"https://codeload.github.com/cijiugechu/libopus_sys/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cijiugechu%2Flibopus_sys/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28851100,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["audio","ffi-bindings","opus-codec","rust"],"created_at":"2025-01-22T00:19:12.609Z","updated_at":"2026-01-28T20:39:58.980Z","avatar_url":"https://github.com/cijiugechu.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `libopus_sys`\n\n`libopus_sys` is an FFI-Rust-binding to `Opus` version 1.5.\n\nOriginally, this sys-crate was made to empower the `serenity`-crate to build audio features on Windows, Linux, and macOS. However, it's not limited to that.\n\nEveryone is welcome to contribute,\ncheck out the [`CONTRIBUTING.md`](CONTRIBUTING.md) for further guidance.\n\n# Building \u0026 Linking\n\nThis crate can either:\n\n- link against a **system-installed** `libopus`, or\n- build Opus from **vendored sources** (no system `libopus` required) via the `bundled` feature.\n\n## Features\n\n- `bundled`: build Opus from the vendored `opus/` sources using CMake (**does not require a system `libopus`**)\n- `static`: prefer static linking\n- `dynamic`: prefer dynamic linking\n- `generate_binding`: regenerate `src/lib.rs` from `src/wrapper.h` (requires libclang)\n\n## Requirements\n\n- To **build Opus from source** (e.g. `--features bundled`): you need `cmake`.\n- To **link a system libopus via pkg-config**: you need `pkg-config` (Unix / GNU targets only).\n- This crate ships with pre-generated bindings. To **regenerate bindings** you need\n  [`Clang`](https://rust-lang.github.io/rust-bindgen/requirements.html#clang) and `LIBCLANG_PATH`.\n\n## Recommended: build from vendored sources (no system dependency)\n\nIf you want a build that does not depend on any system-installed `libopus`, enable `bundled`:\n\n```bash\ncargo build --features bundled\n```\n\nYou can also force this via environment variables:\n\n- `OPUS_BUNDLED=1`\n- `LIBOPUS_BUNDLED=1`\n\nWhen `bundled` is enabled, the build script uses CMake to compile the vendored `opus/` sources and\nlinks the resulting library.\n\n## Linking\n\n`libopus_sys` targets Opus 1.5 and supports Windows, Linux, and macOS.\n\n### Static vs dynamic\n\n- By default, we link **statically** on Windows, macOS, and `musl` targets.\n- By default, we link **dynamically** on Linux `gnu` targets.\n\nYou can override this with features:\n\n- `--features static`\n- `--features dynamic`\n\nIf both are enabled, we pick the default for your target (as described above).\n\nEnvironment variables `LIBOPUS_STATIC` or `OPUS_STATIC` take precedence over features: if either\nis set, static linking is selected (the value does not matter).\n\n### How libopus is located (when `bundled` is not enabled)\n\nOn Unix / GNU targets, the build script will:\n\n- try `pkg-config` for `opus` (unless `LIBOPUS_NO_PKG` or `OPUS_NO_PKG` is set)\n- otherwise, if `LIBOPUS_LIB_DIR` or `OPUS_LIB_DIR` is set, link from that prefix\n- otherwise, if vendored sources (`opus/`) are present, build Opus via CMake\n\nIf none of these work, the build fails with instructions on how to proceed.\n\n## Pkg-Config\n\nOn Unix / GNU targets (and when `bundled` is not enabled), `libopus_sys` will try `pkg-config`\nfirst. Set `LIBOPUS_NO_PKG=1` or `OPUS_NO_PKG=1` to bypass it.\n\n## System libopus (pre-installed)\n\nIf you prefer to link an existing `libopus` installation (or you already ship one with your\napplication), you can point the build script at it:\n\n- `LIBOPUS_LIB_DIR=/path/to/prefix`\n- `OPUS_LIB_DIR=/path/to/prefix`\n\nWhere `/path/to/prefix` contains `lib/` (e.g. `/usr/local`, a Homebrew prefix, etc.).\n\nBe aware that using an Opus other than version 1.5 may not work.\n\n# Generating The Binding\nIf you want to generate the binding yourself, you can use the\n`generate_binding`-feature.\n\nBe aware, `bindgen` requires Clang and its `LIBCLANG_PATH`\nenvironment variable to be specified.\n\n# Installation\nAdd this to your `Cargo.toml`:\n\n```toml\n[dependencies]\nlibopus_sys = \"0.3\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcijiugechu%2Flibopus_sys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcijiugechu%2Flibopus_sys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcijiugechu%2Flibopus_sys/lists"}