/cargo-lock

Self-contained Cargo.lock parser with optional dependency graph analysis

Primary LanguageRustApache License 2.0Apache-2.0

cargo-lock crate

Latest Version Docs Build Status Safety Dance Rust 1.35+ Apache 2.0 OR MIT licensed Gitter Chat

Self-contained serde-powered Cargo.lock parser/serializer with support for both the V1 and V2 (merge-friendly) formats, as well as optional dependency tree analysis features. Used by RustSec.

When the dependency-tree feature of this crate is enabled, it supports computing a directed graph of the dependency tree, modeled using the petgraph crate, along with support for printing dependency trees ala the cargo-tree crate.

Documentation

Requirements

cargo-lock requires Rust 1.35 or later.

Command Line Interface

This crate provides a cargo lock subcommand which can be installed with:

$ cargo install cargo-lock

It supports the following subcommands:

  • list: list packages in Cargo.toml
  • translate: translate Cargo.lock files between the V1 and V2 formats
  • tree: print a dependency tree for a given dependency

See the crate documentation for more detailed usage information.

License

Licensed under either of:

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you shall be dual licensed as above, without any additional terms or conditions.