A crate I am developing is primarily licensed under Apache-2.0 OR MIT
. However, CODE_OF_CONDUCT.md
and some test data are licensed under different licenses such as CC-BY-4.0
and CC0-1.0
. I've excluded these files from the package published on crates.io because I don't think they're necessary for the published package. This means that all files in the package are licensed under Apache-2.0 OR MIT
. In this case, is it Apache-2.0 OR MIT
to specify in the license
field?
In another my project, library crates are licensed under Apache-2.0 OR MIT
, but a binary crate is licensed under GPL-3.0-or-later
. The repository also contains some files licensed under CC-BY-4.0
, but all files included in the published binary crate package are licensed under GPL-3.0-or-later
. In this case, is it GPL-3.0-or-later
to specify in the license
field of the package?
In short, my question is:
Should the
license
field specify the licenses for all files in the repository, or only for files in the published package?
Also, if the licenses for .rs
files and other files (e.g., Cargo.toml
and README.md
) in the published package are different, should I specify only the license for .rs
files in the license
field? Or should I specify the licenses for the other files too?