1

I'm working on a program in the Rust programming language. My program uses libraries (called crates in the Rust's ecosystem) with various licenses, like MIT Apache 2.0 and MPL-2.0. Can I use GPL if I build binaries with libraries with such licenses?

  • Are they statically linked or dynamically linked? – Lucas Ramage Jul 10 at 18:00
  • They are statically linked. – Bence László Jul 11 at 6:34
  • @LucasRamage It does not matter how they are linked in this case. Typically the type of linking you use only becomes a licesing issue with LGPL and only if you want to make your own program closed source rather than GPL. – Brandin Jul 12 at 5:11
  • @Brandin, true but I was still curious about how the project was being built. – Lucas Ramage Jul 12 at 11:55
2

The X11/MIT license, the Apache 2.0 license, and the Mozilla Public License 2.0 are all compatible with the GNU GPL version 3, which means you may include code licensed under those various licenses in a larger work that is licensed under the GPLv3.

The MPL 2.0 and X11/MIT license are also compatible with the older GPLv2 license, but the Apache 2.0 license is compatible only with GPLv3. If you use GPLv2 material in a way that requires to license your work under the GPLv2, you may not include other material licensed under Apache 2.0 in that same work, but you may include MPL 2.0 and MIT-licensed material.

If you merely want to license your own work under the GPL and do not use GPL-licensed material from anyone else, you can create an exception to use other code licensed under any terms you like. In that case, your GPL-with-exceptions license is incompatible with any other GPL-licensed code. Downstream recipients can elect to remove the exception, thereby gaining compatibility with other GPL-licensed code but losing compatibility with whatever normally-incompatible code you allowed via your exception.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.