Documentation

First steps

Create a project

Terminal
dcr new my-app
cd my-app

Structure:

Editor
my-app/
├── dcr.toml
└── src/
    └── main.c

dcr.toml:

Editor
[package]
name = "my-app"
version = "0.1.0"
type = "none"

[build]
language = "c"
standard = "c11"
compiler = "clang"
kind = "bin"

Build

Terminal
dcr build

Output — target/<triple>/debug/my-app (Linux) or target/debug/my-app.exe (Windows).

Build profiles:

Terminal
dcr build --release       # release build
dcr build --debug         # debug (default)

Run

Terminal
dcr run

Builds (if needed) and runs the binary.

First test

Terminal
dcr test --init      # create test template
dcr test             # run tests

Formatting

Terminal
dcr fmt              # clang-format with .clang-format

Linting

Terminal
dcr lint             # clang-tidy checks
dcr lint --fix       # apply fixes automatically