build-plan

Crates.iobuild-plan
lib.rsbuild-plan
version0.1.1
sourcesrc
created_at2018-05-13 21:52:40.603677
updated_at2018-05-14 16:18:50.92141
descriptionA crate for parsing Cargo's --build-plan output
homepage
repositoryhttps://github.com/jonas-schievink/build-plan.git
max_upload_size
id65246
size16,217
Jonas Schievink (jonas-schievink)

documentation

README

Parser for Cargo's --build-plan output

crates.io docs.rs Build Status

Using cargo build --build-plan outputs a JSON document with information about how to compile the crate and its dependencies. The build-plan crate provides a simple way to parse it back into structures without having to depend on the entirety of Cargo.

Cargo's --build-plan functionality is currently unstable, so this only works on nightly Rust for now. Actually, at the time of writing, you even have to build Cargo from source for this!

Usage

Add the dependency to your Cargo.toml:

[dependencies]
build-plan = "0.1.1"

Add the crate to your Rust code and import the BuildPlan type:

extern crate build_plan;
use build_plan::BuildPlan;

Now you can call BuildPlan::from_cargo_output(<raw build plan>) to parse a JSON build plan.

For more info, check the documentation linked above.

Commit count: 12

cargo fmt