I am making a new project, and I'd like to license it under the GNU GPL, so it's vital that I carefully check dependency licenses, especially if they're included in my code. I know I need to include/consider licenses of external crates; I have that down already, and I realise that Rust is licensed under Expat OR Apache-2.0, but what about things listed in ~/.rustup/toolchains/.../share/doc/rust/COPYRIGHT(-library).html? How do those crates and their licenses come into play? Is their code included in my linked code or the compiled binary? And what does all this mean in terms of licensing my project? I am rather confused by all this.
I am not a lawyer, however I long time ago I did licensing of my product. Since you use GPL, you shouldn't worry about licenses of dependencies. The opposite isn't true.
there's the concept of license compatibility, specifically, GPL compatibility in this case. there's a page on the GNU website listing some common licenses and their compatibility with GPL:
I believe you know better, however I wouldn't choose GPL because using your product become a nightmare for others. It's the reason why Microsoft was pushed to open quite amount of their sources, because they got a risk of using GPL implementation. Anyway, in the era of AI, I can get any product carrying any license and make it license free. So we are beating the dead horse.
Like all software licenses, GPL is a sort of legal document which grants rights to non-copyright holders of a software, to use that software, provided they abide by some rules.
As the author of the software, YOU are the copyright holder. The license under which you release your software does not place restrictions on YOU! It places restrictions on people who receive copies of your software. So you don't need to worry about this - you can do whatever you want with GPL software you have authored, since, again, you are the copyright holder.
The only thing you need to worry about is complying with licenses of your dependencies. If your dependencies are GPL then you must license your project as GPL.
Its possible for you to create an unfortunate situation, where your GPL licensed project is using dependencies which are not compatible with GPL, because they impose additional requirements which the GPL prohibits. In this case, you still only need to worry about complying with the licenses of your dependencies. You still are not affected by such an incompatibility - it would only restrict other people who receive your software from modifying and redistributing it in compliance with GPL. If somebody did that, i.e. modified and distributed your software without complying with its license, the burden would generally be on you, the copyright holder, to initiate legal action against that person to get them to stop. You cannot accidently do that, so you have nothing to worry about.
You have to read their license texts and do what they say.
Yes, the code of external crates is included in your compiled binary, and is part of your "work", for the purposes of GPL. (An exception is made for 'standard libraries')
Lastly, I would say if the GPL license confuses you, you should stay away from it. Also much of this will depend on the version of GPL you plan to use.
IANAL, but I have worked with lawyers on open source license compliance. This is not legal advice, just my understanding.
The various projects listed in COPYRIGHT-library are dependencies of std, and might be included in your binary depending on the features of the standard library that you use, and which platforms you're targeting. All of those licenses are compatible with the normal rust Apache 2.0 OR MIT license option, and all are GPL compatible, so releasing a work using the rust std as GPL is fine.
Just like any dependencies - direct OR transitive - you do need to follow their terms and include the appropriate copyright notices and license acknowledgements in your distribution documentation. That probably just means adding the appropriate bits copied from COPYRIGHT-library to your own copyright notices.
You can try to get fine-grained and figure out which ones are actually included in your project, or you can just play it safe and include them all in your credits.
If the dependency is a "system library" like glibc or other, then it doesn't matter. If the dependency's code is included in mine in any way, it must be GPL-compatible.
That's sort of the point: I am not using GPL because I just want a quick, lax license. If I wanted that, I'd pick Expat. I am using GPL because I want my software to be completely free, copyleft software. If that means that a proprietary company can't use it without freeing their code, so be it; that creates more software freedom.
I am confused. Is that not copyright/license infringement?
That hasn't been tested in court yet, and even when it is, it'll only apply to the jurisdiction where that happens. Anyone with a reasonable sense of caution isn't going to assume that LLM output is safe unless you're using uncopyrightable short snippets of code.