writing_an_interpreter_in_rust
writing_an_interpreter_in_rust copied to clipboard
Add a LICENSE file
I personally suggest MIT and/or Apache2.
A license should definitly be added. I'm a little sceptic with allowing this code to be used for commerical purposes, though. It would be a possible scenario that someone takes the code of the (later finished) interpreter and releases another (commerical) book. It's not a too big deal, but maybe choosing something that forbids commerical use (at least without contributing back to the community) would be the better choice?
As far as I remember MIT/ Apache2 allows commerical usage.
If you don't want someone to read something and create a commercial book about it don't make that thing public (we can't prevent this).
GPLv{2,3} is what you want regarding the software. GPL allows commercial usage but requires the source be readily available to anyone who requests it.
https://www.gnu.org/licenses/gpl-2.0.txt https://www.gnu.org/licenses/gpl-3.0.txt
Author of the book this code is based on chiming in. If you have a license that says "do what you want with the Rust code, but give mention that it's based on the book presented in the code" then use that one.
@chr4 Any decision on this?
Not yet. I'm not sure how to best continue this, especially as I used @JayKickliter's implementation as a reference for parts of the lexer (which has also no license). Maybe you can comment on this, Jay?
Do you have anything in mind with the code that requires a particular license?
@ch4 You can use it however you want. I can add a license file if you need.