A Rust-based multi-platform build tool for compiling Xiph "opus-family" libraries (libogg / libopus / libopusenc / libopusfile) and organizing outputs into a unified directory structure.
- Reads
build_config.tomlto select libraries, platforms, architectures, and library types (static/shared) - Fetches/reuses upstream source repos and checks out pinned versions
- Apple platforms (macOS / iOS / iOS Simulator): builds universal binaries and packages them into
.xcframework - Android: builds per-ABI outputs (
.sofor shared or.afor static) and archives them underbuild/lib/android/... - Harmony: builds per-ABI outputs (
.sofor shared or.afor static) and archives them underbuild/lib/harmony/...
| Platform | Architectures / ABIs | Output Extension | Notes |
|---|---|---|---|
| macOS | arm64, x86_64 |
a / dylib inside .xcframework/framework |
dylib not supported yet |
| iOS Device | arm64 |
a / dylib inside .xcframework/framework |
dylib not supported yet |
| iOS Simulator | arm64, x86_64 |
a / dylib inside .xcframework/framework |
dylib not supported yet |
| Android | arm64-v8a, armeabi-v7a, x86_64, x86 |
a / so |
|
| Harmony | armeabi-v7a, arm64-v8a, x86_64 |
a / so |
This project is under active development now. Issues below are being worked on:
- Darwin shared library is not supported yet (macOS/iOS).
- Rust toolchain (stable recommended)
- git
- Autotools toolchain (required by upstream libraries):
autoconf/automake/libtool - Apple platforms: Xcode / Command Line Tools (
xcrun,clang,xcodebuild) - Android: NDK, configured via
ndk_pathinbuild_config.toml
Build (reads build_config.toml from the current directory):
cargo run -- buildMore verbose output:
cargo run -- -v buildClean:
cargo run -- cleanClean build artifacts only:
cargo run -- clean -bIf you don't want to build locally, you can run everything on GitHub Actions:
- Fork this repository.
- Edit
build_config.tomlin your fork to select (see Configuration) - Push commits to your fork:
- pushing to the fork's
mainbranch triggers CI automatically, or - go to GitHub Actions →
CI→Run workflowto trigger it manually.
- Download build outputs from the workflow run page (Artifacts section).
Notes:
- To create a draft GitHub Release with the build artifacts attached, push a git tag that matches
v*(e.g.v0.1.0) to your fork. TheCDworkflow will run and create/update a draft release whose body lists the library versions read frombuild_config.toml.
Build behavior is controlled by build_config.toml. Common fields:
[general]libraries: libraries to build (e.g.["libogg"])platforms: platforms to build (e.g.["ios", "ios-sim", "android"])keep_intermediate: whether to keep intermediate build artifacts
[platforms.<name>]archs: target architectures / ABIslib_type:staticorshared
[libraries.<name>]version: git tag/commit to check outconfigure_flags/cflags/ldflags: per-library extra flags
Example: build iOS static libraries (device + simulator) only:
[general]
libraries = ["libogg"]
platforms = ["ios", "ios-sim"]
[platforms.ios]
archs = ["arm64"]
lib_type = "static"
[platforms.ios-sim]
archs = ["arm64", "x86_64"]
lib_type = "static"The default output directory is build/:
build/include/<libname>/: unified headers outputbuild/lib/build/lib/darwin/<libname>-<version>.xcframework/: Apple.xcframeworkbuild/lib/android/<abi>/<libname>-<version>/: archived Android outputsbuild/lib/harmony/<abi>/<libname>-<version>/: archived Harmony outputs
Lower-level intermediate artifacts live under build/<platform>/<arch>/<repo>/... and will be removed automatically when keep_intermediate=false.