cargo-attribution
A cargo subcommand to give credit to your dependencies
Install and Usage
Install cargo-attribution with: cargo install cargo-attribution.
Run it in your project directory with: cargo attribution.
Main Features
-
Download a general version of the licenses used by your dependencies. They are downloaded from the spdx license-list-data: https://github.com/spdx/license-list-data
-
Create a
crates.tomlfile that contains metadata for the project's dependencies, and aself.tomlfile that includes metadata of the project itself, including copyright notices.
Example of a dependency:
[[]]
= "wasm-bindgen"
= "0.2.87"
= """
Easy support for interacting between JS and Rust.
"""
= "MIT/Apache-2.0"
= ["Copyright (c) 2014 Alex Crichton"]
= ["The wasm-bindgen Developers"]
= "https://github.com/rustwasm/wasm-bindgen"
= "https://rustwasm.github.io/"
You can check the crates.toml file, self.toml and licenses generated for this project.
Purpose
This command allows you to comply with licenses that require you to retain the license and copyright notices, such as the MIT license, without the need to include the same license repeatedly.
MIT license extract:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
LICENSE
cargo-attribution is provided under the MPL v2.0 license. Refer to the LICENSE file for more details.