-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect libstd dependencies and licenses #16
Comments
Scanning This file is distributed by rustup in what appears to be an attempt at complying with the license:
I think the most reasonable way forward on this is:
|
Btw, the easy way to get toolchain paths is e.g.: In terms of bash -c "cd $(rustc --print=sysroot)/lib/rustlib/src/rust/library/std && cargo metadata --locked --format-version 1" |
jq ".packages | group_by(.license) | map({key:.[0].license, value:map(.name)}) | from_entries" {
"Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT": [
"wasi",
"wasi"
],
"MIT OR Apache-2.0": [
"alloc",
"cc",
"core",
"getrandom",
"hashbrown",
"libc",
"panic_abort",
"rand",
"rand_chacha",
"rand_core",
"std",
"std_detect",
"unwind"
],
"MIT/Apache-2.0": [
"cfg-if",
"compiler_builtins",
"dlmalloc",
"hermit-abi",
"ppv-lite86",
"rand_hc",
"rustc-demangle",
"rustc-std-workspace-alloc",
"rustc-std-workspace-core"
],
"MPL-2.0": [
"fortanix-sgx-abi"
]
} I assume crates using e.g. While it might not be accurate enough, it feels better than just ignoring it. Oh and if the toolchain is from (I will say, a lot more users likely have cc @Jake-Shadle (would |
Rust's libstd is also licensed under
MIT OR Apache-2.0
and includes transitive dependencies that we need to scan and process the licenses for all of them to include in the attribution output.https://github.com/rust-lang/rust/blob/master/src/libstd/Cargo.toml
Related:
The text was updated successfully, but these errors were encountered: