This document describes how to create a new release of opus-head-sys.
- Update version in
Cargo.toml - Update CHANGELOG (if you have one)
- Run tests to ensure everything works:
cargo test --all-features cargo clippy --all-features - Verify package builds correctly:
cargo publish --dry-run
git add Cargo.toml
git commit -m "chore: bump version to X.Y.Z"
git push origin mainThe release pipeline triggers on version tags matching v*:
# Create annotated tag
git tag -a v0.1.0 -m "Release v0.1.0"
# Push the tag
git push origin v0.1.0Once you push the tag, the GitHub Actions release pipeline (.github/workflows/release.yml) will automatically:
- Generate DNN weights - Compiles and runs the official Opus
write_lpcnet_weights.cprogram - Create artifacts:
opus_data-<model_hash>.bin- DNN weights blobopus_data-<model_hash>.bin.md5- MD5 checksum
- Create GitHub Release with:
- Release notes
- Attached weight files as downloadable assets
Monitor the workflow at: https://github.com/xnorpx/rust-opus/actions
After the GitHub release is created successfully:
# Login to crates.io (first time only)
cargo login
# Publish the crate
cargo publishNote: The crate excludes the large DNN weight data files (*_data.c) to stay under crates.io's 10MB limit. Users need to download weights separately from GitHub releases when using DRED/OSCE features.
This project follows Semantic Versioning:
- MAJOR (X.0.0) - Incompatible API changes
- MINOR (0.X.0) - New features, backwards compatible
- PATCH (0.0.X) - Bug fixes, backwards compatible
For pre-releases, use suffixes like -alpha, -beta, -rc.1:
git tag -a v0.2.0-alpha.1 -m "Pre-release v0.2.0-alpha.1"If you need to generate weights locally (e.g., for testing):
# Requires a C compiler (MSVC, GCC, or Clang)
python generate_weights.py --output ./weights
# Output files:
# weights/opus_data-<hash>.bin - DNN weights blob
# weights/opus_data-<hash>.bin.md5 - MD5 checksumEnsure the exclusions in Cargo.toml are correct:
cargo package --list | grep -E "\.c$|data"No *_data.c files should appear in the output.
Check the GitHub Actions logs. Common issues:
- Missing C compiler in CI environment
- Opus source not properly checked out (submodules)
The model hash comes from vendored/opus/autogen.sh. If Opus updates their models, the hash will change automatically.
- Update vendored Opus snapshot and patch set
- Enable CMake Unity builds for the vendored Opus build
- Add source-level fixes for Unity build compatibility
- Tighten CI warning checks across supported platforms
- Initial release
- FFI bindings to Opus codec
- DRED (Deep REDundancy) support
- OSCE (Opus Speech Coding Enhancement) support
- Runtime DNN weight loading via
OPUS_SET_DNN_BLOB()