Simple commands
new, build, run, test, clean, add, fmt, lint: the whole workflow in one tool.
Build, run, and test C and C++ projects from a single dcr.toml, with dependencies managed for you. No Makefiles, no CMake scripts. Just dcr new, dcr build, and dcr run.
$ dcr new myapp
Creating project `myapp` Created directory `myapp` Created dcr.toml Created src/main.c Initialized git repository Created project `myapp` info: Next steps: cd myapp dcr run
$ cd myapp
$ dcr run
project myapp (debug, x86_64-unknown-linux-gnu) compile myapp v0.1.0 [1/1] done in 0.24s run /home/dexoron/tmp/myapp/target/x86_64-unknown-linux-gnu/debug/myapp Hello World!
$
Everything you need to build C and C++.One tool, one config, one workflow.
new, build, run, test, clean, add, fmt, lint: the whole workflow in one tool.
Use libraries from a local folder, a Git repository, a registry, or the system via pkg-config. dcr.lock records exactly what was resolved, including the Git commit.
Build for another OS or architecture from the same project. Set the target with a full target triple or a short name like windows.
dcr gen produces compile_commands.json and ready-made VS Code and CLion configs, so you can keep your editor.
Name, language, standard, compiler, and dependencies all live in dcr.toml, not scattered across scripts.
Every command has --help, and package installs include man pages such as man dcr-build.
Create and run a C or C++ project in three steps.
dcr new sets up a project with a dcr.toml and a ready-to-build src/main.c.
$ dcr new myapp
Creating project `myapp` Created project `myapp` info: Next steps: cd myapp dcr run
$ cd myapp
Describe the project in one short, readable TOML file. No CMake syntax required.
[package] name = "myapp" version = "0.1.0" dcr-version = "0.9.6" [build] language = "c" standard = "c11" compiler = "clang" kind = "bin" [dependencies]
dcr run builds the project and its dependencies, then runs the result.
$ dcr run
project myapp (debug, x86_64-unknown-linux-gnu) compile myapp v0.1.0 [1/1] done in 0.24s run /home/user/myapp/target/x86_64-unknown-linux-gnu/debug/myapp Hello World!
Need custom compiler flags, Qt support, or a bare-metal build?
Read the documentationInstall DCR with a single command.
curl -fsSL https://sh.dcr-tool.ru | sh irm https://ps1.dcr-tool.ru | iex curl -fsSL https://sh.dcr-tool.ru | sh yay -S dcr brew tap dexoron/dexoron && brew install dcr nix profile install github:dexoron/dcr cargo install dcr Then verify:
dcr --version The installer also sets up dcrup, a version manager for DCR.