#cargo #querying #projects #cargo-lock #clearly-defined #cd-to-notice #cd-to-csv

app cl-to-cd

Tools for querying ClearlyDefined for Rust projects using Cargo

3 releases

0.0.1 Dec 14, 2019
0.0.1-alpha7 Dec 13, 2019

#24 in #cargo-lock

MIT license

15KB
78 lines

Cargo.lock to ClearlyDefined

These tools allow querying ClearlyDefined for information about packages found in Cargo.lock.

cl-to-cd

This tool takes a Cargo.lock on stdin, and outputs an array of coordinates in ClearlyDefined format, it is meant to be used with the tools below.

cd-to-csv

This tool takes an array of coordinates and queries ClearlyDefined for their license information, then outputs a csv format. For example, use in your CI system like this:

cat Cargo.lock | cl-to-cd | cd-to-csv > deps.csv

And save deps.csv in your build artifacts.

cd-to-notice

This tool takes an array of coordinates and queries ClearlyDefined to generate a "notice" file. For example, use in your CI system like this:

cat Cargo.lock | cl-to-cd | cd-to-notice > notice.txt

And bundle notice.txt with your distributions.

Also see

Dependencies

~20MB
~437K SLoC