An open API service indexing awesome lists of open source software.

https://github.com/pistonite/depfile

Simply parse `.d` files
https://github.com/pistonite/depfile

build-system cpp d dependency-parser depfile gcc make makefile parser rust

Last synced: 7 months ago
JSON representation

Simply parse `.d` files

Awesome Lists containing this project

README

          

# depfile

Simply parse `.d` files.

```rust
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](https://docs.rs/depfile) on docs.rs