Cargo's JSON output includes information on the libraries being linked: https://github.com/alilleybrinker/cargo-spdx/issues/11#issue-1299992878 This should let us reliably (?) determine if a C library is being statically linked or not, and the version of the -sys or -src crate.