🚚 The easy way to ship dependency licenses with your Rust binaries
Run:
cargo install cargo-3plAs part of your distribution process, run:
cargo 3pl > LICENSE-THIRD-PARTYThis project creates a summary of your dependency licenses from their license field in Cargo.toml. It then tries to find their license files. It looks for:
- filenames that contain
LICENSE,LICENCE,NOTICE, orCOPYING(case-insensitive) txt,md, or no extension (case-insensitive)
Dependencies in the current workspace are not included.
Specify features to include
cargo 3pl --features <FEATURES>...
cargo 3pl --all-features
cargo 3pl --no-default-featuresSpecify targets
cargo 3pl --target x86_64-unknown-linux-gnuIf any packages are missing license files, create a new file:
================================================================================
some-package LICENSE.txt
================================================================================
...
================================================================================
other-package COPYING
================================================================================
...
And append it:
cat LICENSE-MANUAL >> LICENSE-THIRD-PARTYWe also recommend creating a pull request for the package.
View the changelog
Everyone is encouraged to help improve this project. Here are a few ways you can help:
- Report bugs
- Fix bugs and submit pull requests
- Write, clarify, or fix documentation
- Suggest or add new features
To get started with development:
git clone https://github.com/ankane/cargo-3pl.git
cd cargo-3pl
cargo run