Buildy is a simple Rust-based build tool for C/C++ projects. It tracks
file dependencies (via gcc -MM), computes hashes, and performs incremental
compilation with a daemon mode and a REPL interface.
- Scans source (
.c,.cpp,.h, etc.) files and builds a dependency graph - Computes file hashes and last-modified times to detect dirtiness
- Topologically sorts changed files and compiles in parallel using all CPU cores
- Parses user headers using GCC/G++ flags; ignores system headers
- Maintains a cache to avoid unnecessary recompilation
- Watch mode with interactive REPL (
build,run,close,help) - Tracks deleted/renamed files and invalidates cache accordingly
- Supports specifying project root via
--rootoption
Build from source:
cargo build --releaseRun one-shot build in current or specified directory:
cargo run -- build # build in current directory
cargo run -- --root=path build # build in given pathStart the daemon with REPL:
cargo run -- watchCommands available in REPL:
build– trigger a build based on changed filesrun– execute the linked binary (named after project directory)closeorexit– save state and quit the daemonhelp– display command list
The tool stores its cache in .buildy_cache.json in the project root.
Currently only C and C++ compilation is supported (using gcc/g++).
For release builds you can modify flags or extend configuration.
This repository is a starting point; further enhancements such as compiler-version detection, custom flags, or more intelligent incremental scanning can be added. EOF"
