mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 15:20:51 +00:00
- Updated build and run commands to accept a --target option for specifying target platforms. - Enhanced documentation to include cross-compilation usage and supported targets. - Modified configuration to allow target-specific settings and toolchains. - Introduced a new test command to run project tests with specified profiles and targets. - Improved handling of target directories and output structure for different platforms. - Added support for multiple targets in the configuration file. - Implemented inheritance for workspace and dependencies based on target and profile.
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
debugorreleaseprofiles (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.tomlwith[package],[build],[dependencies]. - Recursive source discovery in
src/:- C:
*.c - C++:
*.cpp,*.cxx,*.cc
- C:
- 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)staticlibsharedlib
- Optional custom output directory via
build.target. - Optional
build.platformto pass architecture hints (-march//arch). - Optional
build.exclude/build.includefor source/header selection. - Optional
build.roots/build.src_disableto replace the defaultsrc/root. - Optional build steps with
build.stepsandbuild.post_steps. - Optional
build.pkg_configintegration. - Optional
build.cleanandbuild.expect. - Optional
[run].cmdto override run command. - Workspace builds via
[workspace]with per-projectdcr.toml. - Path dependencies with include/lib resolution and
dcr.lockgeneration.
Important behavior notes
dcr.tomlis required forbuild,run, andclean.runworks only withbuild.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/.