Документация

Первые шаги

Создать проект

Terminal
dcr new my-app
cd my-app

Будет создана структура:

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"

Сборка

Terminal
dcr build

Результат — target/\<triple>/debug/my-app (Linux) или target/debug/my-app.exe (Windows).

Профиль сборки:

Terminal
dcr build --release       # release сборка
dcr build --debug         # debug (по умолчанию)

Запустить

Terminal
dcr run

Собирает (если нужно) и запускает бинарник.

Первый тест

Terminal
dcr test --init      # создать шаблон теста
dcr test             # запустить тесты

Форматирование

Terminal
dcr fmt              # clang-format по .clang-format

Linting

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