21 releases

0.6.8 Apr 11, 2024
0.6.7 Oct 17, 2023
0.6.6 Aug 11, 2023
0.6.5 Jan 21, 2023
0.2.2 Dec 13, 2017

#105 in Cargo plugins

Download history 5/week @ 2024-01-14 17/week @ 2024-02-18 28/week @ 2024-02-25 10/week @ 2024-03-03 17/week @ 2024-03-10 9/week @ 2024-03-17 16/week @ 2024-03-24 77/week @ 2024-03-31 170/week @ 2024-04-07 34/week @ 2024-04-14

299 downloads per month

MIT license

52KB
232 lines

Bill of Materials for Rust Crates

Crates.io

A Software Bill of Materials (software BOM) is a list of components in a piece of software. Software vendors often create products by assembling open source and commercial software components. The software BOM describes the components in a product. It is analogous to a list of ingredients on food packaging.

Source: Wikipedia

This tool (cargo bom) can be used to construct Bill of Materials for software using Cargo package manager.

The output of cargo bom has two sections. First it prints out a table with all top level dependencies, version numbers and names of licenses. Then it prints all license texts found from depended projects (files matching globs "LICENSE*" and "UNLICENSE*").

Example usage

$ cargo bom >BOM.txt
$ head BOM.txt
┌───────────┬─────────┬─────────────────┐
 Name      │ Version │ Licenses        │
├───────────┼─────────┼─────────────────┤
 anyhow    │ 1.0.68  │ Apache-2.0, MIT │
├───────────┼─────────┼─────────────────┤
 cargo     │ 0.67.0  │ Apache-2.0, MIT │
├───────────┼─────────┼─────────────────┤
 itertools │ 0.10.5  │ Apache-2.0, MIT │
├───────────┼─────────┼─────────────────┤
 structopt │ 0.3.26  │ Apache-2.0, MIT │

Windows

In Windows the output to file can be written via the following PowerShell command:

cargo bom | Out-File -FilePath BOM.txt -Encoding oem

Bill of Materials

The Bill of Materials for this project can be found from BOM.txt.

License

cargo bom is distributed under the terms of the MIT license.

See LICENSE for details.

Dependencies

~73MB
~1.5M SLoC