- Incremental builds (object caching by mtime)
- `build.kind` with `staticlib` support
- Custom output directory via `build.target`
This commit is contained in:
2026-02-26 17:03:35 +08:00
parent 9fe2604154
commit 7817834790
19 changed files with 410 additions and 56 deletions

View File

@@ -119,6 +119,8 @@ Two profiles are supported:
Custom flags can be added in `dcr.toml` via `build.cflags` and `build.ldflags`.
You can also set `build.target` to override the output directory (profile-independent).
Use `build.kind = "staticlib"` to build a static library instead of a binary.
`dcr run` is only for `build.kind = "bin"` and will fail for `staticlib`.
## Configuration
The main project file is `dcr.toml`.
@@ -143,6 +145,8 @@ ldflags = ["-lm"]
Path dependencies are supported. DCR will resolve them on build and generate `dcr.lock`.
Incremental build note: object files are rebuilt when source `.c/.cpp` files change. Header dependency tracking is not implemented yet.
## Requirements
- Rust toolchain (`rustc`, `cargo`) - for building DCR from source
- C compiler (`clang`, `gcc`, or 'cl'(msvc))