depfile 0.1.0

Simply parse .d files
Documentation
  • Coverage
  • 100%
    14 out of 14 items documented1 out of 14 items with examples
  • Size
  • Source code size: 32.55 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 3.68 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Pistonight

depfile

Simply parse .d files.

use std::borrow::Cow;

fn main() {

    let input = r"
x.cpp.o: x.cpp \
  include/foo.h \
  include/bar.h
include/foo.h:
include/bar.h: fiz.h
";

    let targets = depfile::parse(input).expect("syntax error");
    for dep in targets.recurse_deps("x.cpp.o") {
        println!("x.cpp.o depends on: {dep}");
    }
}

See documentation on docs.rs