cargo-3pl

Crates.iocargo-3pl
lib.rscargo-3pl
version0.1.3
sourcesrc
created_at2021-12-09 04:10:33.968008
updated_at2023-01-30 00:43:30.521332
descriptionThe easy way to ship dependency licenses with your Rust binaries
homepage
repositoryhttps://github.com/ankane/cargo-3pl
max_upload_size
id494965
size31,362
Andrew Kane (ankane)

documentation

README

Cargo 3PL

:truck: 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
Commit count: 38

cargo fmt