Skip to content

Document the mp3lame LGPL-3.0 carve-out in deny.toml#119

Merged
martsokha merged 1 commit into
mainfrom
deny-mp3-lgpl-exception
Jul 3, 2026
Merged

Document the mp3lame LGPL-3.0 carve-out in deny.toml#119
martsokha merged 1 commit into
mainfrom
deny-mp3-lgpl-exception

Conversation

@martsokha

Copy link
Copy Markdown
Member

MP3 encoding pulls mp3lame-encoder / mp3lame-sys (LGPL-3.0 via libmp3lame). It sits behind the opt-in mp3 feature, so it's absent from the default dependency graph cargo deny evaluates — CI (cargo deny check all) is unaffected and stays green. But a cargo deny --all-features run rejects the LGPL, since it isn't in the global allow list.

Change

Add a scoped [licenses].exceptions entry for mp3lame-encoder + mp3lame-sys (rather than allowing LGPL-3.0 globally), with a comment recording the rationale. Targeting by crate name also sidesteps the crate's deprecated bare LGPL-3.0 SPDX id (valid form is LGPL-3.0-only), which otherwise emits a parse warning.

Why keep LAME at all

A deep-research pass confirmed MP3 encoding has no production-quality, permissively-licensed alternative in the Rust ecosystem: LAME is effectively the only option, oxideav-mp3 (MIT) is a yanked pre-production stub, and every real substitute — including the Shine fixed-point encoder and its shine-rs port — is also LGPL. The LGPL obligation is satisfiable for proprietary use via dynamic/separate linking.

Verification

  • cargo deny check all (what CI runs) → advisories ok, bans ok, licenses ok, sources ok (unchanged).
  • cargo deny --all-features check licenseslicenses ok (previously rejected the LGPL; the exception now clears it).

🤖 Generated with Claude Code

MP3 encoding uses `mp3lame-encoder` / `mp3lame-sys` (LGPL-3.0 via libmp3lame).
It's behind the opt-in `mp3` feature, so it's absent from the default graph
`cargo deny` evaluates — CI (`cargo deny check all`) is unaffected — but a
`--all-features` run rejects the LGPL since it isn't in the global `allow` list.

Add a scoped `[licenses].exceptions` entry (crate-name-targeted, so it also
sidesteps the crate's deprecated bare `LGPL-3.0` SPDX id) rather than allowing
LGPL globally. A comment records why: MP3 encoding has no production-quality
permissive alternative (LAME is effectively the only option; every substitute
incl. Shine is also LGPL), and the obligation is satisfiable for proprietary
use via dynamic/separate linking.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@martsokha martsokha added the chore maintenance, dependency updates, code cleanup label Jul 3, 2026
@martsokha martsokha self-assigned this Jul 3, 2026
@martsokha martsokha merged commit da9bea4 into main Jul 3, 2026
1 check passed
@martsokha martsokha deleted the deny-mp3-lgpl-exception branch July 3, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore maintenance, dependency updates, code cleanup

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant