Files
dcr/docs
Dexoron 7969209eae Added:
- `build.kind = "efi"` — UEFI PE32+ executable support. Links with `-shared -nostdlib -Wl,-dll -Wl,--subsystem,10`, output via `efi_path()` with `.efi` extension, rejected by `dcr run`.
- `build.kind = "elf"` — bare-metal ELF executable support. Uses `elf_path()` output path, rejected by `dcr run`, no extra linker flags.

Fixed:

- `dcr run` with `--target` or `build.target` now correctly finds the binary in the arch-specific target directory.
- `dcr run` checks profile-specific `build.{profile}.kind` before rejecting library builds (previously only checked `build.kind`).
- `dcr clean` now reads `build.target` from `dcr.toml` when no `--target` flag is given.
- Linux: target directory is now consistent — `target/<arch>-unknown-linux-gnu/<profile>/` (no stale `target/<profile>/`).
- `dcr.lock` is now populated with all resolved dependencies (registry, path, git) instead of being always empty.
- Git dependencies are now properly recognized and recorded in `dcr.lock`.
- `is_registry_dep` correctly identifies version-based registry dependency tables (`{ version = "..." }`) and rejects tables with unknown keys.
- `dcr test` accepts `--debug`/`--release` flags (defaults to `debug` profile instead of always `release`).
- Build fingerprint cache (`build_cache_path`) now includes `target_dir` — different targets no longer share a single cache entry.
- `object_path` no longer hardcodes the `src/` prefix — works correctly with custom `build.roots` (e.g. `roots = ["lib"]`).
- `dcr update` now generates `.exe` candidates for all Windows targets, not just `x86_64-pc-windows-msvc`.
- Compiler existence is verified before starting the build (clear error if compiler is not found in PATH).
- Consolidated duplicate `OUTPUT_MUTEX` definitions — MSVC backend now uses the shared mutex from `common.rs`.
- Registry cache root directory is created if missing (prevents cryptic errors when `~/.dcr/` does not exist).
2026-05-26 16:38:23 +08:00
..
2026-05-26 16:38:23 +08:00
2026-05-26 16:38:23 +08:00
2026-05-26 16:38:23 +08:00
2026-03-19 00:02:04 +08:00

Introduction

DCR (Dexoron Cargo Realization) is a Cargo-style CLI for C/C++ projects.

Current DCR focuses on a simple, predictable workflow:

  • create or initialize a project (dcr new, dcr init)
  • build with debug or release profiles (dcr build)
  • run binaries (dcr run)
  • clean artifacts (dcr clean)
  • update the installed binary (dcr --update)

What is implemented in this version

  • Project configuration in dcr.toml with [package], [build], [dependencies].
  • Recursive source discovery in src/:
    • C: *.c
    • C++: *.cpp, *.cxx, *.cc
  • Compiler selection from dcr.toml (clang, gcc, cl, clang-cl, etc.).
  • ASM support via language = "asm" (GCC/Clang, NASM, GAS).
  • Mixed language builds via language = ["c", "asm"] and similar combinations.
  • Three build kinds:
    • bin (default)
    • staticlib
    • sharedlib
  • Optional custom output directory via build.target.
  • Optional build.platform to pass architecture hints (-march / /arch).
  • Optional build.exclude/build.include for source/header selection.
  • Optional build.roots/build.src_disable to replace the default src/ root.
  • Optional build steps with build.steps and build.post_steps.
  • Optional build.pkg_config integration.
  • Optional build.clean and build.expect.
  • Optional [run].cmd to override run command.
  • Workspace builds via [workspace] with per-project dcr.toml.
  • Path dependencies with include/lib resolution and dcr.lock generation.

Important behavior notes

  • dcr.toml is required for build, run, and clean.
  • run works only with build.kind = "bin".
  • Incremental rebuild tracks source file timestamps and header dependencies (rebuilds when either source or included headers change).
  • Object files are always created under target/<profile>/obj/.

Repository