ndarilek / tts-rs

115 stars 25 forks source link

Make speech-dispatcher opt-in so we can avoid LGPL by default #21

Closed emilk closed 2 years ago

emilk commented 2 years ago

speech-dispatcher uses the copy-left LGPL license, which means it cannot be used in any closed source projects. Since this is a default dependency (on linux), it means the whole tts crate becomes impossible to depend on for any crate that would like to not be copy-left.

This PR makes it an opt-in dependency. This means using tts on Linux will by default result in an error, until a user actively adds the speech-dispatcher to tts.

I know this isn't ideal, and if anyone has a better suggestion, I'm all ears.

I use tts as an opt-in dependency of https://crates.io/crates/egui-winit, and this can cause situations where others may not want to depend on my crate because of the copy-left issue.

The problem was discovered thanks to https://github.com/EmbarkStudios/cargo-deny

ndarilek commented 2 years ago

That doesn't seem right. It's LGPL, but that's not viral in the same way the GPL is. You can use it as a dependency, you just can't modify it without contributing back changes. At least, that's my interpretation as the author of that crate, who just picked that license to be compatible with that of speech-dispatcher. And I'm pretty sure there are closed source libraries depending on the native library.

If I'm wrong, please correct me.

ndarilek commented 2 years ago

I opened https://gitlab.com/ndarilek/speech-dispatcher-rs/-/issues/2 to track the relicense. But if you'd like to for now, feel free to develop under the assumption that the code will ultimately be tri-licensed as LGPL/MIT/Apache 2.0. I only have the one contributor, and if they don't agree to the relicense then I'll revert their contributions and rewrite them myself.

Apologies for the confusion. As the speech-dispatcher crate author, I don't intend to pursue LGPL license violations on this, particularly as I'm using it myself in closed-source products. I'll update this PR when the license change is live.

emilk commented 2 years ago

Thank you for responding, and for taking this seriously! A tri-license would be much appreciated.

LGPL is difficult to interpret (and I'm not a lawyer), but a common interpretation is that it is fine for non-LGPL code to dynamically link with a LGPL library so that the LGPL library can be updated independently of the application using it. Of course, cargo uses static linking. Again, I'm not a lawyer, but I would sleep better if there were no LGPL rust code in any of my dependencies!

https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License#Differences_from_the_GPL

ndarilek commented 2 years ago

v0.20.2, in the build pipeline now, should resolve this. Please let me know if this passes cargo-deny for you.

emilk commented 2 years ago

Works great - thank you so much @ndarilek !