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
- Host: GitHub
- URL: https://github.com/pistonite/depfile
- Owner: Pistonite
- License: mit
- Created: 2025-08-17T03:54:55.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-08-17T03:55:24.000Z (8 months ago)
- Last Synced: 2025-08-25T08:38:40.436Z (7 months ago)
- Topics: build-system, cpp, d, dependency-parser, depfile, gcc, make, makefile, parser, rust
- Language: Rust
- Homepage: https://docs.rs/depfile
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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