HACKER Q&A
📣 linkdd

What OSS license should I choose?


Hello HN,

I'm currently working on Letlang[0] as a side project, TLDR: this is a general purpose programming language which compiles to Rust.

Right now, the repository is not open-source, mainly because I have not chosen a license yet.

Most of the time, I release softwares or libraries under the terms of the MIT license, because I do not really care about who can use the code. Sometimes I release them under the terms of the Apache Public License 2.0, when I care about the name but still not about who can use the code.

I'm wondering if this software should be released under the terms of the GPL (2 or 3? i don't know), I want to keep things open, included external contributions, so this seems like a good fit.

What I'm not sure about is about the "contamination" of the GPL:

  - does the templates I use to generate Rust code would "contaminate" the produced code? (I don't want to)
  - does the runtime crate I link statically with the generated Rust code would "contaminate" the final library/executable? (I don't want to)
If the answer is yes to the previous questions, then the GPL would be a bad fit. Then, what license should I use?

Thank you in advance HN :)

[0] - https://letlang.dev


  👤 mindcrime Accepted Answer ✓
Tough call. For me, if I were doing a programming language, I'd probably go with the Apache License or something. I like the GPL and other copyleft licenses, but don't want to deal with the confusion around "Are binaries produced by the compiler bound to be GPL'd" kind of questions. I think GCC even ships with a "GPL + some special extra verbiage" license if memory serves correctly. Me, I don't want to deal with "special extra verbiage" because I'm lazy. But it really depends on your ideals / goals and what-not.

If it helps, there are a couple of (free) books out there that run through a lot of explanations of different OSS licenses and the benefits and tradeoffs of each.

https://people.debian.org/~dktrkranz/legal/Understanding%20O...

https://www.rosenlaw.com/oslbook.htm

There's also "Producing OSS" which may be of interest to you:

https://producingoss.com/


👤 DamonHD
You're going to hit the religious wars on this one, but for me basically all code goes under Apache 2 to maximise freedom of people to use that code for any purpose, likewise Solderpad for electronics and CC0 for data where I can. If you want your stuff to be used, rather than getting glory for it, the most liberal licence possible is likely to help IMHO.