[package]
edition = "2024"
rust-version = "1.85"
name = "rusty-opus"
version = "1.0.2"
authors = [
"jinti<shenjindi@fourz.cn>",
"Remade-With-Rust",
]
build = false
exclude = [
"fuzz/",
"*.txt",
"bench_quick.sh",
"tests/analyze_encode.rs",
"tools/",
"fixtures/gate_corpus/",
"docs/census-2026-08-07/",
".github/",
".semgrep/",
"supply-chain/",
"docs/audit/",
"docs/plans/",
"docs/great-gate.md",
"docs/gate-ledger.md",
"docs/newmath-quality-plan.md",
"docs/optimization-plan.md",
"rust-toolchain.toml",
".cargo/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Pure-Rust Opus audio codec (RFC 6716): encoder and decoder, SILK/CELT/Hybrid, SIMD-accelerated, zero dependencies"
homepage = "https://github.com/Remade-With-Rust/rusty-opus"
documentation = "https://docs.rs/rusty-opus"
readme = "README.md"
keywords = [
"opus",
"audio",
"codec",
"decoder",
"encoder",
]
categories = [
"multimedia::audio",
"multimedia::encoding",
]
license = "BSD-3-Clause"
repository = "https://github.com/Remade-With-Rust/rusty-opus"
[features]
profile = []
research = []
[lib]
name = "rusty_opus"
path = "src/lib.rs"
[[example]]
name = "analysis_trace"
path = "examples/analysis_trace.rs"
[[example]]
name = "decode_bit"
path = "examples/decode_bit.rs"
[[example]]
name = "encode_bit"
path = "examples/encode_bit.rs"
[[example]]
name = "encode_ogg"
path = "examples/encode_ogg.rs"
[[example]]
name = "encode_speed"
path = "examples/encode_speed.rs"
[[example]]
name = "fec_test"
path = "examples/fec_test.rs"
[[example]]
name = "gate_arm_cost"
path = "examples/gate_arm_cost.rs"
[[example]]
name = "ms_test"
path = "examples/ms_test.rs"
[[example]]
name = "plc_test"
path = "examples/plc_test.rs"
[[example]]
name = "repack_test"
path = "examples/repack_test.rs"
[[example]]
name = "resampler_delay"
path = "examples/resampler_delay.rs"
[[example]]
name = "roundtrip"
path = "examples/roundtrip.rs"
[[example]]
name = "roundtrip_parallel"
path = "examples/roundtrip_parallel.rs"
[[example]]
name = "wav_test"
path = "examples/wav_test.rs"
[[test]]
name = "celt_budget_test"
path = "tests/celt_budget_test.rs"
[[test]]
name = "celt_loopback_test"
path = "tests/celt_loopback_test.rs"
[[test]]
name = "celt_multi_frame"
path = "tests/celt_multi_frame.rs"
[[test]]
name = "celt_realistic_test"
path = "tests/celt_realistic_test.rs"
[[test]]
name = "celt_silence"
path = "tests/celt_silence.rs"
[[test]]
name = "celt_synthesis_test"
path = "tests/celt_synthesis_test.rs"
[[test]]
name = "energy_norm_test"
path = "tests/energy_norm_test.rs"
[[test]]
name = "hybrid_48k_audio_test"
path = "tests/hybrid_48k_audio_test.rs"
[[test]]
name = "hybrid_48k_test"
path = "tests/hybrid_48k_test.rs"
[[test]]
name = "hybrid_celt_fix_tests"
path = "tests/hybrid_celt_fix_tests.rs"
[[test]]
name = "hybrid_mode_test"
path = "tests/hybrid_mode_test.rs"
[[test]]
name = "mdct_basic_test"
path = "tests/mdct_basic_test.rs"
[[test]]
name = "mdct_gain_test"
path = "tests/mdct_gain_test.rs"
[[test]]
name = "mdct_identity_full_test"
path = "tests/mdct_identity_full_test.rs"
[[test]]
name = "mdct_identity_minimal"
path = "tests/mdct_identity_minimal.rs"
[[test]]
name = "mdct_identity_test"
path = "tests/mdct_identity_test.rs"
[[test]]
name = "mdct_identity_test_v2"
path = "tests/mdct_identity_test_v2.rs"
[[test]]
name = "mdct_identity_test_v3"
path = "tests/mdct_identity_test_v3.rs"
[[test]]
name = "mdct_loopback_debug"
path = "tests/mdct_loopback_debug.rs"
[[test]]
name = "mdct_loopback_test"
path = "tests/mdct_loopback_test.rs"
[[test]]
name = "mdct_passthrough_test"
path = "tests/mdct_passthrough_test.rs"
[[test]]
name = "mdct_pulse_test"
path = "tests/mdct_pulse_test.rs"
[[test]]
name = "mdct_pure_loopback"
path = "tests/mdct_pure_loopback.rs"
[[test]]
name = "mdct_recon_test"
path = "tests/mdct_recon_test.rs"
[[test]]
name = "mdct_roundtrip"
path = "tests/mdct_roundtrip.rs"
[[test]]
name = "mdct_sine_test"
path = "tests/mdct_sine_test.rs"
[[test]]
name = "mdct_test"
path = "tests/mdct_test.rs"
[[test]]
name = "multi_frame_interop_test"
path = "tests/multi_frame_interop_test.rs"
[[test]]
name = "nsq_rd_microbench"
path = "tests/nsq_rd_microbench.rs"
[[test]]
name = "nsq_shape_microbench"
path = "tests/nsq_shape_microbench.rs"
[[test]]
name = "opus_celt_roundtrip"
path = "tests/opus_celt_roundtrip.rs"
[[test]]
name = "oracle_bitexact"
path = "tests/oracle_bitexact.rs"
[[test]]
name = "parallel_encode"
path = "tests/parallel_encode.rs"
[[test]]
name = "preemph_test"
path = "tests/preemph_test.rs"
[[test]]
name = "profile_encode"
path = "tests/profile_encode.rs"
[[test]]
name = "properties"
path = "tests/properties.rs"
[[test]]
name = "proptest_encode_indices"
path = "tests/proptest_encode_indices.rs"
[[test]]
name = "pvq_consistency_test"
path = "tests/pvq_consistency_test.rs"
[[test]]
name = "pvq_sign_test"
path = "tests/pvq_sign_test.rs"
[[test]]
name = "pvq_sync_test"
path = "tests/pvq_sync_test.rs"
[[test]]
name = "quality_regression_test"
path = "tests/quality_regression_test.rs"
[[test]]
name = "rate_test"
path = "tests/rate_test.rs"
[[test]]
name = "resampler_gain_test"
path = "tests/resampler_gain_test.rs"
[[test]]
name = "silk_bitstream_compare"
path = "tests/silk_bitstream_compare.rs"
[[test]]
name = "silk_bitstream_test"
path = "tests/silk_bitstream_test.rs"
[[test]]
name = "silk_burg_test"
path = "tests/silk_burg_test.rs"
[[test]]
name = "silk_encode_test"
path = "tests/silk_encode_test.rs"
[[test]]
name = "silk_fixed_point_compare"
path = "tests/silk_fixed_point_compare.rs"
[[test]]
name = "silk_init_test"
path = "tests/silk_init_test.rs"
[[test]]
name = "silk_loopback_test"
path = "tests/silk_loopback_test.rs"
[[test]]
name = "silk_lpc_test"
path = "tests/silk_lpc_test.rs"
[[test]]
name = "silk_nlsf_test"
path = "tests/silk_nlsf_test.rs"
[[test]]
name = "silk_nsq_test"
path = "tests/silk_nsq_test.rs"
[[test]]
name = "silk_pitch_test_simple"
path = "tests/silk_pitch_test_simple.rs"
[[test]]
name = "stereo_test"
path = "tests/stereo_test.rs"
[[test]]
name = "test_48k_crash"
path = "tests/test_48k_crash.rs"
[[test]]
name = "test_shift3_mdct"
path = "tests/test_shift3_mdct.rs"
[[test]]
name = "verify_bands_match"
path = "tests/verify_bands_match.rs"
[[test]]
name = "verify_pvq_match"
path = "tests/verify_pvq_match.rs"
[[test]]
name = "verify_quant_match"
path = "tests/verify_quant_match.rs"
[[test]]
name = "verify_silk_decoder"
path = "tests/verify_silk_decoder.rs"
[[test]]
name = "verify_silk_roundtrip"
path = "tests/verify_silk_roundtrip.rs"
[[bench]]
name = "opus_bench"
path = "benches/opus_bench.rs"
harness = false
[dev-dependencies.criterion]
version = "0.8.2"
features = ["cargo_bench_support"]
default-features = false
[dev-dependencies.proptest]
version = "1"
features = ["std"]
default-features = false
[dev-dependencies.rusty_alloc-api]
version = "=2.2.6"
[lints.clippy]
approx_constant = "allow"
as_ptr_cast_mut = "allow"
branches_sharing_code = "allow"
cast_lossless = "allow"
cast_possible_truncation = "allow"
cast_possible_wrap = "allow"
cast_precision_loss = "allow"
cast_ptr_alignment = "allow"
cast_sign_loss = "allow"
comparison_chain = "allow"
doc_markdown = "allow"
drop_non_drop = "allow"
excessive_precision = "allow"
explicit_counter_loop = "allow"
float_cmp = "allow"
fn_params_excessive_bools = "allow"
if_not_else = "allow"
imprecise_flops = "allow"
inline_always = "allow"
items_after_statements = "allow"
large_stack_arrays = "allow"
manual_midpoint = "allow"
many_single_char_names = "allow"
match_same_arms = "allow"
missing_const_for_fn = "allow"
module_name_repetitions = "allow"
must_use_candidate = "allow"
needless_range_loop = "allow"
neg_cmp_op_on_partial_ord = "allow"
ptr_as_ptr = "allow"
range_plus_one = "allow"
similar_names = "allow"
struct_excessive_bools = "allow"
suboptimal_flops = "allow"
too_long_first_doc_paragraph = "allow"
too_many_arguments = "allow"
too_many_lines = "allow"
undocumented_unsafe_blocks = "deny"
unreadable_literal = "allow"
useless_let_if_seq = "allow"
wildcard_imports = "allow"
[lints.clippy.all]
level = "deny"
priority = -1
[lints.clippy.nursery]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
unused_must_use = "deny"
[profile.bench]
overflow-checks = false
inherits = "release"
[profile.release]
lto = "fat"
codegen-units = 1
overflow-checks = true