#cargo #cargo-toml #license #binaries #ship #find #summary

app cargo-3pl

The easy way to ship dependency licenses with your Rust binaries

4 releases

0.1.3 Jan 30, 2023
0.1.2 Nov 30, 2022
0.1.1 Dec 10, 2021
0.1.0 Dec 9, 2021

#292 in Cargo plugins

33 downloads per month

MIT/Apache

13KB
254 lines

Cargo 3PL

🚚 The easy way to ship dependency licenses with your Rust binaries

Build Status

Installation

Run:

cargo install cargo-3pl

Getting Started

As part of your distribution process, run:

cargo 3pl > LICENSE-THIRD-PARTY

How It Works

This 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, or COPYING (case-insensitive)
  • txt, md, or no extension (case-insensitive)

Dependencies in the current workspace are not included.

Options

Specify features to include

cargo 3pl --features <FEATURES>...
cargo 3pl --all-features
cargo 3pl --no-default-features

Specify targets

cargo 3pl --target x86_64-unknown-linux-gnu

Missing License Files

If 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-PARTY

We also recommend creating a pull request for the package.

History

View the changelog

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

To get started with development:

git clone https://github.com/ankane/cargo-3pl.git
cd cargo-3pl
cargo run

Dependencies

~1.6–2.6MB
~51K SLoC