feat: make VST3 an opt-in cargo feature
Cargo.toml declared Apache-2.0 while the default build linked vst3-sys, whose bindings are GPLv3 — so the artifact a fresh clone produced could not legally be distributed under the licence the repo claimed. A template should not hand that trap to every project cloned from it. NIH-plug already anticipates this: its `vst3` feature exists, in upstream's own words, "mostly for GPL-compliance reasons". Taking `default-features = false` and re-exporting `vst3` as a local opt-in makes the default build CLAP-only and genuinely Apache-2.0 clean, while `--features vst3` remains one flag away for anyone who accepts GPLv3. Gating the feature rather than relicensing keeps the decision with whoever uses the template. Reversing it is a one-line default plus removing two cfg attributes, where relicensing to GPLv3 now would commit every downstream plugin to that choice. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WHt4DykxXaQnyaJfyS8KCn
This commit is contained in:
+10
-1
@@ -10,6 +10,14 @@ license = "Apache-2.0"
|
||||
[workspace]
|
||||
members = ["xtask"]
|
||||
|
||||
[features]
|
||||
# CLAP only by default. NIH-plug's VST3 bindings (vst3-sys) are GPLv3, so linking
|
||||
# them makes the resulting binary GPLv3 regardless of what this package declares.
|
||||
# Opt in explicitly — and relicense this crate — if you intend to ship a VST3:
|
||||
# cargo xtask bundle nih_plug_template --release --features vst3
|
||||
default = []
|
||||
vst3 = ["nih_plug/vst3"]
|
||||
|
||||
[lib]
|
||||
# `cdylib` is the plugin binary; `lib` (rlib) lets `cargo test` link the unit tests.
|
||||
crate-type = ["cdylib", "lib"]
|
||||
@@ -17,7 +25,8 @@ crate-type = ["cdylib", "lib"]
|
||||
[dependencies]
|
||||
# Pinned to the same commit as musiikki/codename-206.
|
||||
# Update the `rev` when you want to update NIH-plug.
|
||||
nih_plug = { git = "https://github.com/robbert-vdh/nih-plug.git", rev = "f36931f7af4646065488a9845d8f8c2f95252c23", features = ["assert_process_allocs"] }
|
||||
# `default-features = false` drops nih_plug's default `vst3` feature; see [features] above.
|
||||
nih_plug = { git = "https://github.com/robbert-vdh/nih-plug.git", rev = "f36931f7af4646065488a9845d8f8c2f95252c23", default-features = false, features = ["assert_process_allocs"] }
|
||||
nih_plug_egui = { git = "https://github.com/robbert-vdh/nih-plug.git", rev = "f36931f7af4646065488a9845d8f8c2f95252c23" }
|
||||
|
||||
[profile.release]
|
||||
|
||||
Reference in New Issue
Block a user