cargo-attribution
Installation
Cargo install
Compile the crate yourself with:
cargo install cargo-attribution
Cargo binstall
Install a binary version:
cargo binstall 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
dependencies.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:
[[]]
= "wasi"
= "0.11.0+wasi-snapshot-preview1"
= "Experimental WASI API bindings for Rust"
= "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT"
= ["The Cranelift Project Developers"]
= "https://github.com/bytecodealliance/wasi"
You can check the dependencies.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.