depfile

Crates.iodepfile
lib.rsdepfile
version0.1.1
created_at2025-08-17 03:50:16.50967+00
updated_at2025-08-17 03:58:01.548339+00
descriptionSimply parse .d files
homepage
repositoryhttps://github.com/Pistonite/depfile
max_upload_size
id1799106
size33,406
Michael Zhao (Pistonight)

documentation

README

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

Commit count: 0

cargo fmt