# Changelog ## [Unreleased] ### RU **Добавлено:** - **Зеркала загрузок в `dcrup`** — `--mirror auto|cf|gh|sf|ya` и `DCRUP_MIRROR`. По умолчанию `auto`: **cf → gh → sf → ya** (CloudFlare CDN, GitHub, SourceForge, Yandex CDN). **Удалено:** - **`install.sh` / `install.ps1` / `install_bsd.sh`** — устарели, заменены `dcrup`. ### EN **Added:** - **Download mirrors in `dcrup`** — `--mirror auto|cf|gh|sf|ya` and `DCRUP_MIRROR`. Default `auto` tries **cf → gh → sf → ya** (CloudFlare CDN, GitHub, SourceForge, Yandex CDN). **Removed:** - **`install.sh` / `install.ps1` / `install_bsd.sh`** — superseded by `dcrup`. ## [v0.8.5] - 2026-08-08 "Фиксация версии dcr-version и предупреждения совместимости / Config Version Pinning & Compatibility Warnings" ### RU **Добавлено:** - **`package.dcr-version`** — опциональный pin версии CLI в `dcr.toml`. `dcr new` / `dcr init` пишут текущую версию. При загрузке конфига: - нет / пустой pin → warn «добавь dcr-version»; - dcr старше pin → warn «обнови dcr»; - dcr новее pin → warn «проверь changelog, подними pin»; - равенство — тишина. Команды не падают, только предупреждение (раз на path за процесс). ### EN **Added:** - **`package.dcr-version`** — optional CLI version pin in `dcr.toml`. `dcr new` / `dcr init` write the current version. On config load: - missing / empty pin → warn "add dcr-version"; - dcr older than pin → warn "update dcr"; - dcr newer than pin → warn "check changelog, update pin"; - equal → silent. Commands do not fail, warning only (once per path per process). ## [0.8.4] - 2026-08-04 "Инфраструктура .dcr/ и интеграция с IDE / Internal .dcr/ Layout & IDE Integration" ### RU **Добавлено:** - **Директория `.dcr/`** — единый machine-readable источник фактов о сборке для IDE/расширений: - `.dcr/compile_commands.json` - `.dcr/build-info.json` (`schemaVersion`, `artifact_path`, `profile`, …) - `.dcr/toolchain.json` (compiler/debugger paths, moc/uic/rcc) - `.dcr/ide/` (заготовки lock-файлов для расширений) - **`dcr gen project-info`** — поля `target`, `target_dir`, `artifact_path`, `artifact_kind`, `source_roots`, `include_globs`, `exclude_globs`; пути абсолютные/канонические. - **`dcr build --print-artifact-path`** — после успешной сборки одна строка absolute path на stdout. - **`dcr gen … --quiet` / `-q`** — без human-лога на stdout для `compile-commands` / `project-info`. - **`.clangd`** — при первом `gen` создаётся с `CompilationDatabase: .dcr` (маркер `# managed by dcr gen`); ручной `.clangd` не перезаписывается. - **Хелперы** `canonicalize_path`, `atomic_write`, `ensure_dcr_dir`; pure `resolve_artifact_path` через `platform::*`. - **`dcr new` / `dcr init`** — `.dcr/` в `.gitignore`. **Изменено (breaking):** - **`compile_commands.json` перенесён** из корня проекта в **`.dcr/compile_commands.json`**. clangd находит базу через `.clangd` / `clangd.arguments --compile-commands-dir=.dcr`. CLion `misc.xml` и VSCode `settings.json` обновлены под новый путь. - **Атомарная запись** `compile_commands.json` (tmp + rename). - **`gen vscode` / `gen clion` launch/run** — `program`/`executable` через тот же artifact resolver, что `project-info` / `build-info.json` (Linux triple, Windows `.exe`, custom `target`/`filename`). **Исправлено:** - Launch-конфиги больше не указывают `target//` без triple на Linux. - Симлинки/mount: root и пути в compile database канонизируются best-effort. ### EN **Added:** - **`.dcr/` directory** — shared machine-readable build facts for IDE integrations: - `.dcr/compile_commands.json` - `.dcr/build-info.json` (`schemaVersion`, `artifact_path`, `profile`, …) - `.dcr/toolchain.json` (compiler/debugger paths, moc/uic/rcc) - `.dcr/ide/` (placeholder for IDE lock files) - **`dcr gen project-info`** — `target`, `target_dir`, `artifact_path`, `artifact_kind`, `source_roots`, `include_globs`, `exclude_globs`; absolute/canonical paths. - **`dcr build --print-artifact-path`** — one absolute artifact path line on stdout after a successful build. - **`dcr gen … --quiet` / `-q`** — suppress human success logs for gen subcommands. - **`.clangd`** — created on first gen with `CompilationDatabase: .dcr` (`# managed by dcr gen`); custom `.clangd` is not overwritten. - **Helpers** `canonicalize_path`, `atomic_write`, `ensure_dcr_dir`; pure `resolve_artifact_path` via `platform::*`. - **`dcr new` / `dcr init`** — add `.dcr/` to `.gitignore`. **Changed (breaking):** - **`compile_commands.json` moved** from project root to **`.dcr/compile_commands.json`**. clangd discovers it via `.clangd` / `--compile-commands-dir=.dcr`. CLion and VSCode generators updated accordingly. - **Atomic write** for compile_commands (tmp + rename). - **`gen vscode` / `gen clion` launch/run** — use the same artifact path resolver as `project-info` / `build-info.json`. **Fixed:** - Launch configs no longer hardcode `target//` without the Linux triple segment. - Symlink/mount roots: best-effort canonicalize for root and compile database paths. ## [0.8.3] - 2026-08-03 "Конфигурация host target, аргументы run и нативные пути артефактов / Host Target Config, Run Args & Native Artifact Paths" ### RU **Добавлено:** - **`dcr run -- ...`** — cargo-style: всё после bare `--` передаётся собранному бинарнику (`dcr run --release -- --test_help`). Работает и для прямого запуска, и для `[run].cmd`. - **Интеграционные / unit-тесты** — host target sections применяют `ldflags` без `--target`; проброс аргументов после `--`; парсер `split_double_dash`. **Изменено:** - **Native-сборка резолвит host triple** — без `--target` / без `build.target` конфиг-секции вида `[build.x86_64-unknown-linux-gnu]` (и аналоги host) снова применяются (`cflags` / `ldflags` / toolchain). Раньше target был «пустым», секции молча игнорировались, а артефакты уже лежали под host triple — линковка без `-L`/`-l`. - **Пустой target** — `normalize_target_os("")` больше не warn'ит `Unknown target ''`. - **`dcr run --help` / man `dcr-run`** — документирован разделитель `--` и forwarding args. **Исправлено:** - **Нативные пути артефактов на Windows и macOS** — без явного `--target` / `build.target` артефакты снова сохраняются в `target/`, поэтому `dcr run` и flat-bin находят результат сборки. - Target-specific `ldflags` на native Linux/macOS/Windows (host triple) не доходили до линкера. - Ложный warning на пустой target string. ### EN **Added:** - **`dcr run -- ...`** — cargo-style: arguments after a bare `--` are forwarded to the built binary (`dcr run --release -- --test_help`). Works for direct binary runs and `[run].cmd`. - **Tests** — host target sections apply `ldflags` without CLI `--target`; run-arg forwarding; `split_double_dash` unit tests. **Changed:** - **Native builds resolve the host triple** — without `--target` / without package `build.target`, host sections such as `[build.x86_64-unknown-linux-gnu]` (and host equivalents) apply again (`cflags` / `ldflags` / toolchain). Previously the target was empty, those sections were silently ignored while artifacts already used the host triple path — link failed without `-L`/`-l` (e.g. sandbox micro-lang + `libsct-elf`). - **Empty target** — `normalize_target_os("")` no longer warns `Unknown target ''`. - **`dcr run --help` / man `dcr-run`** — document `--` and argument forwarding. **Fixed:** - **Native artifact paths on Windows and macOS** — without an explicit `--target` / `build.target`, artifacts again use `target/`, so `dcr run` and flat-bin find the build output. - Target-specific `ldflags` on native host builds not reaching the linker. - Spurious warning for an empty target string. ## [0.8.2] - 2026-07-22 "CLI Progress, archive Feature, Workspace Path Fixes / CLI Progress, archive Feature, Workspace Path Fixes" ### RU **Добавлено:** - **Прогресс компиляции `[N/M]`** — live-строка `compile pkg v0.1.0 [12/41]` на TTY (stderr), чтобы длинные mono-package сборки не выглядели «зависшими». - **Свой стиль статуса build** — фиксированная колонка глаголов: `project`, `compile`, `dep`, `ready`, `pack`, `done`, `run` (не cargo-clone). - **Cargo feature `archive`** — `fatfs` и упаковка FAT-образов опциональны (`cargo build --features archive`). Release CI собирает с feature; без feature `[archive]` даёт явную ошибку. - **Интеграционные тесты** — `flat_bin_nasm_build`, `package_build_target_used_without_cli_flag`, усилен workspace `clean --all`. - **Расширенный CI** — unit + integration на Linux/macOS/Windows, отдельный job с `--features archive`, rust-cache, clippy default + all-features. **Изменено:** - **CLI host triple больше не форсится** — без `--target` используется `build.target` пакета/member (важно для bare-metal / post_steps ISO). - **Relative `-I`/`-L`/`-T` (и `-isystem`/`-idirafter`)** в cflags/ldflags абсолютизируются относительно корня пакета (workspace CWD = root). - **`dcr clean --all`** — не спамит `target not found` по members без локального `target/` (общий root `target/`). - **`error` / `warn`** — красный / жёлтый, вывод на stderr; `Подсказка:` → `Hint:`. - **`dcr --help` / man** — добавлены `add`, `lint`, `setup`; unknown command → exit code 1. - **Сообщения NotFound** — `linker not found: ld.lld …` / `{tool} not found …` вместо сырого `os error 2`. ### EN **Added:** - **Compile progress `[N/M]`** — live TTY line `compile pkg v0.1.0 [12/41]` so long mono-package builds do not look hung. - **DCR status verbs** — fixed-width column: `project`, `compile`, `dep`, `ready`, `pack`, `done`, `run`. - **Cargo feature `archive`** — optional `fatfs` / FAT packing (`cargo build --features archive`). Release CI builds with the feature; without it `[archive]` errors clearly. - **Integration tests** — `flat_bin_nasm_build`, package `build.target` without CLI flag, stricter workspace `clean --all`. - **Expanded CI** — unit + integration on Linux/macOS/Windows, archive feature job, rust-cache, clippy default + all-features. **Changed:** - **CLI no longer forces host triple** — without `--target`, package/member `build.target` is used (bare-metal / ISO post_steps). - **Relative `-I`/`-L`/`-T` (and `-isystem`/`-idirafter`)** in flags are absolutized against the package root when workspace CWD is the root. - **`dcr clean --all`** — no spam for members without a local `target/` (shared root `target/`). - **`error` / `warn`** — red / yellow on stderr; Russian `Подсказка:` → `Hint:`. - **`dcr --help` / man** — list `add`, `lint`, `setup`; unknown command exits 1. - **NotFound messages** — `linker not found: ld.lld …` / `{tool} not found …` instead of raw `os error 2`. ## [0.8.1] - 2026-07-20 "OS-Dev: flat-bin, FAT-образы / OS-Dev: flat-bin & FAT Images" ### RU **Добавлено:** - **`build.kind = "flat-bin"`** — сырой бинарный артефакт (расширение по умолчанию `.bin`): - **NASM** — `-f bin`, прямой вывод `.bin` - **FASM** — прямой вывод (ожидается `format binary` в исходнике) - **GAS / MASM / LLVM IR (`llc`)** — объект → `objcopy -O binary` → `.bin` - **C/C++ (gcc/clang/MSVC)** — compile → link (nostdlib/static) → `objcopy -O binary` → `.bin` - Требуется `llvm-objcopy` / `objcopy` / `gobjcopy` в PATH (кроме NASM/FASM direct) - **Секция `[archive]`** — после успешной сборки DCR собирает образ диска (FAT12/16/32): размер, offset, volume label, опциональный bootsector и `layout`. С 0.8.2 — за feature `archive`. - **Одиночные файлы в `build.roots`** — корень может быть файлом (`.c`, `.asm`, header), а не только каталогом. **Изменено:** - **`dcr build --force` / `dcr run --force`** — force также перезапускает `build.steps` и `build.post_steps`. - **`dcr run` на workspace-only root** — если задан `[run].cmd`, сначала build + run по конфигу корня; иначе делегирование члену workspace. ### EN **Added:** - **`build.kind = "flat-bin"`** — raw binary (default `.bin`) across NASM/FASM/GAS/MASM/LLC and C/C++ (objcopy where needed). - **`[archive]` section** — FAT12/16/32 disk images after build (from 0.8.2 gated by feature `archive`). - **Single-file `build.roots`**. **Changed:** - **`--force`** re-runs steps/post_steps; workspace-only **`dcr run`** prefers root `[run].cmd` when set. ## [0.8.0] - 2026-07-18 "Модульный Движок Сборки, Новая Архитектура Ядра и Улучшение Workspaces / Modular Build Engine, New Core Architecture, & Workspace Improvements" ### RU **Добавлено:** - **Выделенное ядро сборки (Build Engine extraction)** — вся логика оркестрации компиляции и сборки полностью вынесена из интерфейсного модуля `src/cli/build.rs` в изолированный, переиспользуемый модуль ядра `src/core/build/engine.rs`. - **Полиморфная модель языков (Трейт `Language`)** — введение абстрактного трейта `Language` (`src/core/build/language/mod.rs`). Логика поиска файлов, сопоставления расширений и компиляторов распределена по выделенным языковым бэкендам для C, C++ (включая шаги генерации Qt), LLVM IR и ассемблера (GAS, NASM, FASM, MASM). - **Абстракция сборщиков (Трейт `Builder`)** — введение трейта `Builder` для полиморфного управления процессами компиляции (`src/core/build/builder/mod.rs`). Логика вызова компиляторов семейства GCC/Clang вынесена в общий модуль `builder/cc_common.rs`, а MSVC — в `builder/msvc/`. - **Поязыковая конфигурация (`[build.]`)** — добавлена поддержка индивидуальных настроек для каждого языка в `dcr.toml` (например, `[build.c]`, `[build.cpp]`, `[build.asm]`), позволяя независимо настраивать компилятор, стандарт и флаги сборки. - **Интеграция путей зависимостей в Workspaces** — сборщик теперь автоматически инжектирует пути заголовков (включая исходники `src/` членов, папки `include/` и директорию `target/include`) и библиотек (`target/lib`, а также специфичные для целевой платформы папки сборки) зависимых членов workspace при сборке. - **Система событий `BuildReporter`** — весь вывод сборщика переведён на событийную модель (`src/core/build/report.rs`), что делает движок пригодным для программного встраивания (например, в IDE) без необходимости перехвата stdout/stderr. - **Поддержка отмены сборки** — добавлен потокобезопасный токен отмены (`Arc`), позволяющий безопасно прервать выполнение компиляции на любом этапе. - **Сохранение кастомных ключей TOML** — парсер `dcr.toml` переведен на `toml_edit`, что гарантирует сохранение всех неизвестных/пользовательских ключей, комментариев и форматирования при перезаписи файла (например, через `dcr add`). - **Разрешение заголовков для локальных path-зависимостей** — исправлена проблема, при которой потребители не могли найти заголовочные файлы статических/динамических библиотек, лежащие в упакованной папке `target/include` локальных path-зависимостей. - **Новая система интеграционных тестов** — старый громоздкий файл `tests/cli_basic.rs` разделен на изолированные и структурированные интеграционные тесты для каждой команды и фичи: `cli_build.rs`, `cli_deps.rs`, `cli_lint.rs`, `cli_new.rs`, `cli_qt.rs`, `cli_test.rs`, `cli_workspace.rs`. **Изменено:** - **Дедупликация генерации артефактов** — логика линковки бинарных файлов (ELF, PE, EXE), динамических библиотек (`.so`, `.dll`, `.dylib`) и архивации статических библиотек (`.a`, `.lib`) полностью перенесена в выделенный модуль `src/core/build/builder/artifact.rs`. - **Запуск членов workspace из корня** — команда `dcr run` при вызове из корня workspace-only проекта теперь запускает сборку выбранного пакета в контексте workspace (через флаг `--workspace`), исключая изолированные ошибки сборки. - **Отказ от глобального состояния** — все операции сборки изолированы внутри структуры `BuildContext`, обеспечивая многопоточную безопасность сборщика. - **Вынос логики кэширования** — проверка инкрементальных изменений, отслеживание заголовков (`#include`) и вычисление хэшей сборки перенесено в изолированный модуль `src/core/build/cache.rs`. - **Модуляризация кастомных шагов** — обработка этапа `build.steps` для препроцессоров вынесена в `src/core/build/steps.rs`. ### EN **Added:** - **Dedicated Build Engine (`src/core/build/engine.rs`)** — decoupled the build orchestration logic completely from the CLI front-end wrapper in `src/cli/build.rs` to a reusable, decoupled core build engine. - **Polymorphic Language Model (`Language` trait)** — introduced the abstract `Language` trait (`src/core/build/language/mod.rs`). File scanning, compiler resolution, and flags handling are now encapsulated in dedicated language modules for C, C++ (including Qt code generation), LLVM IR, and ASM (GAS, NASM, FASM, MASM). - **Polymorphic Compilation Dispatch (`Builder` trait)** — introduced the `Builder` trait to generalize builder invocations (`src/core/build/builder/mod.rs`). Consolidated GCC/Clang logic into `builder/cc_common.rs` and Microsoft Visual C++ logic into `builder/msvc/`. - **Per-Language Configuration overrides (`[build.]`)** — introduced support for configuring language-specific compiler, standard, and flags (e.g. `[build.c]`, `[build.cpp]`, `[build.asm]`) independently in `dcr.toml`. - **Automatic Workspace Dependency Injection** — during workspace builds, include/lib paths of dependent workspace members (including their source headers, local `include/` folders, and build target `target/include` / `target/lib` folders) are automatically resolved and injected. - **`BuildReporter` Event System** — decoupled build orchestration output into a structured event-driven reporter model (`src/core/build/report.rs`), making DCR suitable for library embedding and IDE integrations without stderr capturing. - **Build Cancellation Support** — introduced thread-safe cancellation tokens (`Arc`) allowing clients to safely abort compile runs mid-execution. - **TOML Formatting & Custom Keys Preservation** — migrated the config editor to `toml_edit`, preserving all unknown/user-defined TOML keys, structures, and comments during file write operations (e.g., in `dcr add`). - **Path Dependencies Target Include Resolution** — local path dependencies configured via tables now correctly expose headers built and packaged into their `target/include` folder to consumer packages. - **Modular Integration Test Suite** — refactored the monolith `tests/cli_basic.rs` file into clean, specialized integration tests: `cli_build.rs`, `cli_deps.rs`, `cli_lint.rs`, `cli_new.rs`, `cli_qt.rs`, `cli_test.rs`, `cli_workspace.rs`. **Changed:** - **Consolidated Linking and Archiving** — artifact generation (linking executables/shared libraries and archiving static libraries) consolidated into a single `src/core/build/builder/artifact.rs` module. - **Workspace-Aware member execution** — `dcr run` executed at the workspace root of a `workspace_only` project now triggers the member build inside the workspace context using the `--workspace` parameter, preventing standalone build issues. - **Elimination of Global State** — removed global variables and states from the build core, encapsulating build logic inside isolated `BuildContext` structs for thread safety. - **Build Cache Separation** — relocated mtime tracking, incremental caching, and header-dependency checking logic to `src/core/build/cache.rs`. - **Modularized Pre-build Steps** — decoupled generator scripts and pre-build commands parsing into `src/core/build/steps.rs`. ## [0.7.4] - 2026-06-17 "Qt Поддержка, Linting и Рефакторинг Архитектуры / Qt Support, Linting, & Architecture Refactor" ### RU **Добавлено:** - **Нативная поддержка Qt** — добавлена автоматическая обработка мета-объектов (MOC, UIC, RCC) при включении `build.qt = true` в `dcr.toml`. - **Команда `dcr lint`** — статический анализ C/C++ через `clang-tidy`. Поддерживает `--fix` для автоматического исправления. Уважает `build.roots` и `build.src_disable` из конфига. - **Три новых ассемблерных бэкенда**: - **MASM** (`compiler = "ml"` / `"ml64"`) — Microsoft Macro Assembler. - **FASM** (`compiler = "fasm"`) — Flat Assembler. - **LLVM IR** (`compiler = "llc"`) — компиляция `.ll` → объектный файл. - **Общий ASM-пайплайн** — линковка и архивирование вынесены в `core/builder/asm.rs`. Новый ассемблерный бэкенд теперь пишется за ~30 строк. - **Утилиты для файловой системы** — `to_hex()` и `home_dir()` вынесены в `utils/fs.rs`. - **Утилиты для сборки** — `normalize_target()`, `normalize_kind()`, `normalize_platform()`, `default_profile_flags()` вынесены в `utils/build.rs`. - **Утилиты для бэкендов** — `asm_lang_flag()`, `source_extensions()`, `elapsed_secs()` добавлены в `core/builder/common.rs`. - **Полноценная автоматизация Bare-Metal / Freestanding** — добавлен конфигурационный флаг `build.freestanding = true`. При его включении (или при обнаружении bare-metal таргета) DCR автоматически инжектирует флаг `-ffreestanding` на этапе компиляции, а также `-nostdlib` и `-static` на этапе линковки. - **Оптимизация артефактов (LTO и Strip)** — в `dcr.toml` добавлены параметры `build.lto` (авто-инжекция флага `-flto` для компилятора и линкера) и `build.strip` (автоматическое отсекание отладочной информации через флаг `-s` линкера). - **Контроль многопоточности сборки** — добавлен параметр `build.codegen-units`, позволяющий жестко ограничить максимальное количество параллельных потоков сборки для кастомного движка `parallel_build`. - **Управление паникой (Panic Abort)** — добавлен параметр `build.panic = "abort"`. Для C++ проектов он автоматически отключает генерацию таблиц раскрутки стека и исключений через флаги `-fno-exceptions`, `-fno-unwind-tables` и `-fno-asynchronous-unwind-tables`. **Изменено:** - **Интеллектуальные дефолтные флаги (DCR Defaults)** — генерация дефолтных флагов оптимизации (`-O3`/`-O0`), отладки (`-g`) и предупреждений (`-Wall -Wextra`) теперь автоматически отключается для bare-metal и freestanding целей, если пользователь переопределил `build.cflags`. - **Глобальный вынос bare-metal детектора** — функция `is_bare_metal_target` вынесена в общие утилиты `src/utils/build.rs` для сквозного использования в конвейере сборки. - **Рефакторинг архитектуры**: - `src/config.rs` переименован в `src/templates.rs`. - Начата консолидация конфигурационной логики и оркестрации сборки. ### EN **Added:** - **Native Qt support** — automatic meta-object handling (MOC, UIC, RCC) added when `build.qt = true` is set in `dcr.toml`. - **`dcr lint` command** — C/C++ static analysis via `clang-tidy`. Supports `--fix` for automatic fixes. Respects `build.roots` and `build.src_disable` from config. - **Three new assembler backends**: - **MASM** (`compiler = "ml"` / `"ml64"`) — Microsoft Macro Assembler. - **FASM** (`compiler = "fasm"`) — Flat Assembler. - **LLVM IR** (`compiler = "llc"`) — compiles `.ll` files via `llc -filetype=obj`. - **Shared ASM pipeline** — linking and archiving logic consolidated into `core/builder/asm.rs`. Adding a new assembler backend now takes ~30 lines. - **Filesystem utilities** — `to_hex()` and `home_dir()` extracted to `utils/fs.rs`. - **Build utilities** — `normalize_target()`, `normalize_kind()`, `normalize_platform()`, `default_profile_flags()` extracted to `utils/build.rs`. - **Backend helpers** — `asm_lang_flag()`, `source_extensions()`, `elapsed_secs()` added to `core/builder/common.rs`. - **Full Bare-Metal / Freestanding Automation** — introduced the `build.freestanding = true` configuration option. When enabled (or when a bare-metal target is detected), DCR automatically injects `-ffreestanding` during compilation and both `-nostdlib` and `-static` during linking. - **Artifact Optimization (LTO & Strip)** — added `build.lto` (auto-injects `-flto` for compiler and linker) and `build.strip` (automatically strips debug symbols via linker `-s` flag) options to `dcr.toml`. - **Compilation Thread Control** — added the `build.codegen-units` option to strictly limit the maximum number of parallel jobs utilized by the custom `parallel_build` worker pool. - **Panic Behavior Management** — added `build.panic = "abort"` support. For C++ targets, it automatically strips exception handling and unwind tables via `-fno-exceptions`, `-fno-unwind-tables`, and `-fno-asynchronous-unwind-tables`. **Changed:** - **Intelligent Default Flags Generation** — automated injection of fallback optimization (`-O3`/`-O0`), debug (`-g`), and warning (`-Wall -Wextra`) flags is now suppressed for bare-metal and freestanding builds if `build.cflags` are overridden. - **Centralized Bare-Metal Detection** — relocated the `is_bare_metal_target` helper to common build utilities (`src/utils/build.rs`) for unified access across the building core. - **Architectural Refactoring**: - Renamed `src/config.rs` to `src/templates.rs`. - Started consolidation of configuration and build orchestration logic. ## [0.7.3] - 2026-06-13 "Оптимизация Зависимостей и VCS / Dependency Optimization & VCS" ### RU **Добавлено:** - **Параметр `--vcs` для команд `new` и `init`** — добавлена возможность явно указывать систему контроля версий через `--vcs `. - **Интеграция Git-информации в `--version`** — утилита теперь выводит текущий короткий хэш коммита и суффикс `-dirty`, если в репозитории DCR есть незакоммиченные изменения. - **Автоматическая генерация `.gitignore`** — при инициализации Git-репозитория автоматически создается файл `.gitignore` с исключением директории `/target`. - **Защита от вложенных репозиториев** — автоматическая инициализация Git теперь пропускается, если `dcr new` или `dcr init` запускаются внутри уже существующего Git-репозитория. - **Тесты для верификации VCS** — добавлены интеграционные тесты `new_vcs_options_work` и `init_vcs_options_work` для проверки логики инициализации репозиториев. **Изменено:** - **Полный отказ от библиотеки `git2`** — работа с Git (клонирование зависимостей, инициализация VCS, проверка статуса) переведена на вызовы системного `git` через `Command`. Это облегчает сборку проекта и убирает необходимость в фичах `vendored` и `openssl`. - **Миграция с `reqwest` на `ureq`** — в модуле обновления (`flag_update.rs`) тяжелый `reqwest` заменен на легковесный синхронный клиент `ureq 2.10`, что уменьшило оверхед и размер итогового бинарника. ### EN **Added:** - **`--vcs` option for `new` and `init` commands** — introduced explicit version control system selection via `--vcs `. - **Git metadata integration in `--version`** — the CLI now appends the current short commit hash and a `-dirty` suffix if there are uncommitted changes in the DCR repository. - **Automatic `.gitignore` generation** — Git repository initialization now automatically writes a `.gitignore` file excluding the `/target` directory. - **Nested repository prevention** — automatic Git initialization is now skipped if `dcr new` or `dcr init` is executed inside an already existing Git repository. - **VCS verification tests** — added `new_vcs_options_work` and `init_vcs_options_work` integration tests to ensure reliable repository behavior. **Changed:** - **Complete removal of `git2` dependency** — all Git actions (dependency fetching, VCS setup, status checks) are now delegated to the system `git` executable via `Command`. This simplifies compilation and drops the need for `vendored` and `openssl` features. - **Migrated from `reqwest` to `ureq`** — replaced the heavy `reqwest` crate in `flag_update.rs` with the lightweight synchronous `ureq 2.10` client, reducing overhead and the final binary size. ## [0.7.2] - 2026-06-07 "Исправление Таргетов и Линковки / Target & Linker Fixes" ### RU **Добавлено:** - Учтён `target_env` в `default_target_triple()` — Linux (gnu/musl) и Windows (msvc/gnu) теперь используют правильное окружение, а не хардкод. **Исправлено:** - **Сборка на macOS Apple Silicon падала с `_main` undefined** — `--target=` теперь передаётся и в ldflags, не только в cflags. `default_target_triple()` на macOS использует `std::env::consts::ARCH` вместо хардкода `x86_64`. - **Бейджи GitHub Stars и GPL-3.0 не рендерились в README** — блок бейджей переведён на чистый HTML. **Изменено:** - Вычисление таргета по умолчанию вынесено в общую функцию `default_target_triple()` — устранено дублирование в build, run, clean. ### EN **Added:** - `default_target_triple()` now respects `target_env` — Linux (gnu/musl) and Windows (msvc/gnu) use the correct environment instead of hardcoded values. **Fixed:** - **macOS Apple Silicon builds failed with `_main` undefined** — `--target=` is now passed to ldflags, not just cflags. `default_target_triple()` uses `std::env::consts::ARCH` on macOS instead of hardcoded `x86_64`. - **GitHub Stars and GPL-3.0 badges not rendering in README** — badge block converted to pure HTML. **Changed:** - Default target resolution extracted into shared `default_target_triple()` — removed duplication across build, run, clean. ## [0.7.1] - 2026-06-02 "Мультиархитектурное расширение / The Multi-Arch Expansion" ### RU **Добавлено:** - Вывод `--help` для всех команд с цветным форматированием. - man-страницы (12 штук в `man/man1/`) и их установка во всех пакетах. - Валидация имен проектов в `dcr init` и `dcr new` (только ASCII буквы, цифры, `_` и `-`). - Метаданные `documentation` и `homepage` в `Cargo.toml`. - Оптимизация сборки: `opt-level = "z"`, LTO, `codegen-units = 1`, `panic = "abort"`, `strip = true`. - Поддержка новых архитектур (i686, armv7, riscv64gc, aarch64) в рабочих процессах и установочных скриптах. - Сборка пакетов `deb` и `rpm` для всех 5 архитектур Linux через `cargo-zigbuild`. - Пакеты AUR (`dcr-dev`, `dcr-dev-bin`) и сборка Snap в CI. **Изменено:** - Функция `validate_package_name` стала публичной. - Команды `gen`, `tree`, `fmt`, `setup` больше не игнорируют аргументы и используют цветной вывод. - Инструкция в README изменена с `| bash` на `| sh` для POSIX. - Отключена архитектура Windows 32-bit (GNU) из-за проблем со сборкой. **Исправлено:** - **`dcr new ` создаёт директорию, затем падает** — валидация теперь происходит до операций с файлами. - **`dcr init` создаёт dcr.toml, затем падает при невалидном имени директории** — то же исправление. - **Man-страницы отсутствовали после установки** — теперь устанавливаются через скрипты установки, пакетные менеджеры и Homebrew. - **Ложное срабатывание на букву диска в Windows** — в парсинге файлов зависимостей. - **CRLF `\r\n` ломает парсер зависимостей** — теперь обрабатываются смешанные окончания строк. - **Новая строка после обратного слеша не поглощалась** — в обработке escape-последовательностей `parse_d_file`. ### EN **Added:** - `--help` for all commands with styled headers and usage lines. - Man pages (12 troff man pages in `man/man1/`) and their installation across all packaging formats. - Project name validation in `dcr init` and `dcr new` (ASCII letters, digits, `_`, `-` only). - `documentation` and `homepage` metadata in `Cargo.toml`. - Release profile optimizations (`opt-level = "z"`, LTO, `codegen-units = 1`, `panic = "abort"`, `strip = true`). - Linux i686, armv7, riscv64gc, aarch64 architecture support in release workflows and installation scripts. - Multi-arch `deb` and `rpm` package builds for all 5 Linux architectures via `cargo-zigbuild`. - AUR packages (`dcr-dev`, `dcr-dev-bin`) and Snap build in CI. **Changed:** - `validate_package_name` made public and callable from CLI commands directly. - `gen.rs`, `tree.rs`, `fmt.rs`, `setup.rs` no longer ignore arguments and use styled output. - README install instructions changed from `| bash` to `| sh` for POSIX compatibility. - Disabled Windows 32-bit (GNU) target due to build issues. Fixed: - **`dcr new ` creates directory then fails** — validation now happens before any file operations. - **`dcr init` creates dcr.toml then fails on invalid directory name** — same fix. - **Man pages missing after installation** — now installed via install scripts, package managers, and Homebrew. - **Windows drive letter false positive** — in dependency file parsing. - **CRLF `\r\n` breaks dependency parser** — now handles mixed line endings. - **Newline after backslash not consumed** — in `parse_d_file` escape handling. ## [0.7.0] - 2026-06-02 Added: - **OpenBSD and NetBSD target support** — full platform routing with dynamically generated target triples using `std::env::consts::ARCH` and `std::env::consts::OS`. Affects `build`, `run`, `clean`, and the platform module. - **`src/platform/bsd.rs`** — new dedicated BSD platform module shared by FreeBSD, OpenBSD, NetBSD, providing `bin_path`, `lib_path`, `elf_path`, `efi_path`, and `shared_lib_path`. - **`build.out_dir` configuration option** — custom output directory that overrides the default `target//` path for final artifacts. Supported in `build`, `run`, and config validation. - **`dcr fmt` command** — new CLI command that formats all C/C++ source files (`*.c`, `*.cpp`, `*.h`, `*.hpp`) in `src/` and `tests/` using `clang-format`. - **Incremental linking** — `needs_link()` function in `common.rs` that checks whether any object file is newer than the linked output, skipping unnecessary re-linking. Implemented for all backends (`unix_cc`, `msvc`, `gas`, `nasm`). - **`build.kind = "none"` and `"custom"`** — two new project kind types for special build scenarios where no standard artifact is produced. - **`install_bsd.sh`** — dedicated POSIX-compliant install script for BSD systems (FreeBSD, OpenBSD, NetBSD) with binary download and source build modes. - **Linux ARM64 support in `install.sh`** — added `Linux:aarch64|Linux:arm64` target triple detection for pre-built binary downloads. - **BSD OS detection in `install.sh`** — FreeBSD, OpenBSD, NetBSD detection and target triple resolution. - **`rust-toolchain.toml`** — explicit `stable` channel toolchain pinning. - **Nix support** — `flake.nix` for Nix package manager. Run via `nix run github:dexoron/dcr` or install with `nix profile install github:dexoron/dcr`. Contributed by community contributor. - **Snapcraft publish** — `dcrup` published on Snapcraft. Install with `sudo snap install dcrup`. - **Integration tests** — `build_with_target_config` (verifies `build.target = "linux"`) and `build_with_out_dir` (verifies custom output directory). - **`get_build_string_with_profile` made `pub`** — so `run.rs` can resolve custom output directory configuration. Changed: - **`build.target` semantics changed** — now strictly holds the target triple (e.g. `x86_64-unknown-linux-gnu`) or a short name (`linux`, `macos`, `windows`). No longer doubles as a custom output directory — that functionality moved to `build.out_dir`. - **`build.standard` made optional** — changed from `String` to `Option`. Validation only enforces non-empty for non-ASM languages. Skipped in `dcr.toml` output when empty. - **`dcr run` with `out_dir`** — now resolves target directory respecting `build.out_dir` when configured, via `get_build_string_with_profile()` from `build.rs`. - **`collect_sources()` returns empty vec** instead of error when no source files are found, allowing `kind = "none"` or `kind = "custom"` projects to have no source files. - **CI/CD release workflow refactored** — `git2` made target-specific (no vendored-openssl on Windows), Zig-based cross-compilation for non-x86_64 Linux targets, Arch Linux package version sanitization (dashes → dots), NetBSD `gmake` symlink. - **README compatibility table** — FreeBSD, OpenBSD, NetBSD build/runtime status upgraded from community/best-effort to officially supported. - **Documentation rewritten** — available at [dcr.dexoron.su/docs](https://dcr.dexoron.su/docs) or in the `docs/` directory. Installation guides, commands, and reference updated to reflect current CLI and config format. - **Site rewritten** — `dcr-site` migrated to Docusaurus with internationalization (i18n) support, improved navigation, and updated content across all sections. - **Dev channel dependency check in `install.sh`** — checks for `python3` or `jq` before attempting dev channel installations. Fixed: - **`dcr run` stdout/stderr not inherited** — child process output was captured and manually printed, breaking interactive programs. Fixed by switching to `Command::status()`. - **Release CI race condition** — build matrix jobs could upload assets to a release that did not yet exist. Fixed by adding a dedicated `create-release` job. - **GHA release — stable toolchain override** — resolved Rust toolchain override issues in CI. - **Arch Linux package version sanitization** — version strings with dashes (e.g. `0.7.0-dev`) are invalid for Arch Linux `pkgver`. Fixed by replacing dashes with dots. - **GPG permissions after Docker** — Docker operations changed GPG directory ownership. Fixed by running `chown` after Docker commands. - **RPM package artifact paths** — RPM artifacts placed under `rpm/x86_64/` instead of `fedora/x86_64/`. Corrected in Dexoron Packages Index workflow. - **`install.sh` JSON parsing robustness** — added `jq` as primary parser with `python3` fallback for dev channel release lookups. Removed: - **`format_roots()` helper** — removed from `common.rs`. Was only used by the old error path in `collect_sources()`. - **Individual per-distro artifact download steps** — three separate `actions/download-artifact` steps replaced with unified `gh release download --clobber`. ## [0.6.9] - 2026-05-28 Added: - **Dexoron Packages Index** — new standalone CI workflow (`.github/workflows/dexoron-packages-index.yml`) that automatically updates the `dexoron/packages` repository indexes after a release. Supports Arch Linux (`repo-add`), Debian (`dpkg-scanpackages`), and Fedora (`createrepo_c`). Triggered by `workflow_dispatch` or `workflow_run` on the Release workflow. - **Arch Linux native package** (`.pkg.tar.zst`) build inside the release workflow — builds from source in an `archlinux:latest` Docker container using a dynamically generated PKGBUILD. - **AUR publish support** — new `run_aur` workflow dispatch input and `publish-aur` / `publish-aur-bin` jobs that push PKGBUILD / `.SRCINFO` to `aur.archlinux.org`. Changed: - **Release workflow refactored** — Linux packages (deb, rpm, snap, arch) and BSD builds now use `strategy.matrix` instead of separate jobs. A new `publish-dexoron-packages` job collects all package artifacts and uploads them to the GitHub Release in one step. Removed standalone `build-arch-package`, `build-snap`, `build-deb-rpm` jobs. The old `run_arch_native` input is now `run_linux_packages`. - **Dexoron Packages Index workflow** extracted from `release.yml` into its own file with support for Debian and RPM repository indexes in addition to Arch. - **git2 vendoring** — enabled `vendored-libgit2` and `vendored-openssl` features for reproducible CI builds without system libraries. - **cargo-generate-rpm metadata** — updated to the current `package.metadata.rpm` format (uses `files` table instead of `assets` array). Fixed: - **`--target=` no longer passed to GCC** — the flag is now only injected into cflags when the resolved compiler name contains `"clang"`. GCC rejects this flag with `unrecognized command-line option`. - **Workspace clean test** — removed assertions for member-local `target/` directories. Workspace members share the root `target/` directory, so their individual `src//target/` is never created. - **Release build test path** — corrected expected directory from `target/release` to `target/x86_64-unknown-linux-gnu/release`. ## [0.6.8] - 2026-05-27 Added: - `build.cxx_standard` — separate C++ language standard for `.cpp`/`.cxx`/`.cc` files. When set, overrides `build.standard` for C++ sources. Example: ```toml [build] language = ["c", "c++"] standard = "gnu11" cxx_standard = "gnu++17" ``` - Variable substitution for `cflags`, `ldflags`, and `include` directory entries. All `{version}`, `{version_major}`, `{name}`, `{profile}` and other step variables are now available. Example: ```toml [build] cflags = ['-DPROJECT_VERSION="{version}"'] ``` - FreeBSD build support in CI — new `run_bsd` workflow input and `build-bsd` job that cross-compiles `x86_64-unknown-freebsd` via `cargo-zigbuild`. Changed: - License changed from MIT to **GPL-3.0-or-later**. All source files now carry the GPL-3.0 header. Default license in `dcr new` / `dcr init` changed to `"GPL-3.0-or-later"`. README, FAQ, and CONTRIBUTING.md updated accordingly. - `get_list_with_profile_and_target` no longer duplicates list values when `inherit = true` and the profile/target value is identical to the base value. Fixed: - Multi-language `language` array (e.g. `["c", "c++", "asm"]`) no longer drops `c++` during internal parsing — `.cxx`/`.cpp`/`.cc` source files are correctly discovered and compiled. - `-std=` flag is no longer passed to C++ files when only `standard` (C standard) is configured — uses `cxx_standard` when available, otherwise skips `-std=` for C++ sources, avoiding clang error `invalid argument '-std=c11' not allowed with 'C++'`. - Object file collision: source files with the same stem but different extensions (e.g. `gdt.cxx` and `gdt.S`) no longer overwrite each other. Object filenames now include the original source extension (e.g. `gdt.cxx.o`, `gdt.S.o`). - MSVC backend compile step now detects language per source file extension instead of using the global `language` field, fixing mixed C/C++ compilation with MSVC. - Assembler `-x` flag in `unix_cc.rs` and `gen.rs` is now placed **before** the source file, as required by clang/gcc. - `{version}` variables in `build.clean` are now correctly substituted. ## [0.6.7] - 2026-05-26 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. - `build.filename` and `build.extension` in `dcr.toml` — complete control over the final artifact name without relying on `package.name`. Example: ```toml [build] filename = "KERNEL" extension = "EFI" ``` Produces `KERNEL.EFI` (works for `bin`, `staticlib`, and `sharedlib`). - Automatic injection of `--target=` into compiler flags when `build.target` is set in `dcr.toml`. This greatly simplifies clang-based cross-compilation (especially for bare-metal targets like `aarch64-none-elf`). - Bare-metal targets (containing `none`, `-elf`, `eabi`, `baremetal`) no longer receive DCR's internal default flags (`-g`, `-Wall`, `-Wextra`, `-fno-omit-frame-pointer`, `-DDCR_DEBUG`, etc.). Prevents unwanted sections (`.comment`, debug info, etc.) that break custom linker scripts when `inherit = true`. - `build.ldscript` in `dcr.toml` — linker script path passed as `-T ` to the linker. Essential for bare-metal/embedded/freestanding targets. - `dcr build --verbose` — prints compiler/linker command lines (also works with `DCR_DEBUG` env var). - `dcr add ` without a source argument — if a registry is configured, DCR looks up the package by name and adds it as a version dependency. Fixed: - `build.target` declared in `dcr.toml` is now correctly used as the default target even when `--target` is not passed on the command line (previously the host target was always forced for config resolution). - `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/-unknown-linux-gnu//` (no stale `target//`). - `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). Changed: - `openssl` dependency is now conditional (`cfg(not(windows))`) — no longer pulled in on Windows, fixing Windows CI builds that lack Perl `Locale::Maketext::Simple`. On Linux (including musl cross-compilation) the vendored OpenSSL build is unchanged. ## [0.6.6] - 2026-05-18 Fixed: - Path dependencies now work correctly: `dcr add` stores them as `{ path = "./..." }` tables, `is_registry_dep` properly distinguishes registry strings from path/git strings, and `deps/mod.rs` resolves both table-form and legacy string-form path dependencies - Registry dependency paths no longer hardcoded to `project_root/dcr-index`; now use `package_root_from_registry_info()` which resolves relative to the registry cache root (`~/.dcr/`) - Registry dependencies are now actually built: `build_project_at()` is called when `include_dir` or `lib_dir` is missing Added: - `SIGINT`/`Ctrl+C` handler via `ctrlc` crate — `dcr build` now checks `BUILD_INTERRUPTED` flag at key points and aborts cleanly - `utils/build.rs` — extracted shared utilities: `parse_version_info`, `normalize_target_os`, `resolve_compiler`, `primary_language`, `resolve_pkg_config_flags` and config helpers. Eliminates code duplication between `cli/build.rs`, `cli/run.rs`, `cli/clean.rs`, `cli/gen.rs` - `utils/fs.rs::with_dir` — extracted common directory-scoped execution - `run_command_sync_output` in `builder/common.rs` with global `OUTPUT_MUTEX` — synchronized compiler output across all backends (unix_cc, gas, nasm, msvc) - New helper functions in `deps/register.rs`: `get_registry_cache_root`, `package_root_from_registry_info`, `registry_include_dir`, `registry_lib_dir`, `path_from_string_dep` - Unit tests for `register.rs` (`is_registry_dep`, `package_root_from_registry_info`), `deps/mod.rs` (`path_dep_path`, `push_default_lib_dirs`), `utils/build.rs` (`normalize_target_os`, `parse_version_info`) - `dcr tree` command — visual dependency tree viewer (similar to `cargo tree`) Removed: - Removed unused dependencies `indicatif` and `console` from `Cargo.toml` ## [0.6.5] - 2026-05-13 Added: - New dependency registry system - Package type support (`lib`, `app`, `none`) in `dcr.toml` - Library packaging functionality: automatically generates `include` and `lib` directories in `target/` for `lib` type projects - Expanded CI build targets: - Linux: `aarch64-unknown-linux-gnu`, `x86_64-unknown-linux-musl`, `aarch64-unknown-linux-musl` - Windows: `aarch64-pc-windows-msvc`, `x86_64-pc-windows-gnu`, `aarch64-pc-windows-gnullvm` Changed: - `src/core/deps/` modular architecture overhaul - Native platform pathing defaults for Linux (now dynamic architecture detection) - Improved `run` command output handling ## [0.6.0] - 2026-05-12 Added: - Full Git dependency support in `dcr.toml` - Support for `git`, `branch`, `tag`, and `rev` fields - Automatic cloning and checkout via `git2` - Dependencies are stored in `target//deps/git/` - New `dcr add` command for easy dependency management - Short syntax: `github:user/repo`, `gitlab:user/repo`, `path:/to/lib` - Automatic GitHub resolution for `git:user/repo` - Visual feedback for dependency fetching with in-place status updates ("Fetching" → "Fetched") - Modular dependency management architecture in `src/core/deps/` ## [0.5.1] - 2026-04-12 Fixed: - Windows compatibility for target-specific config without --target flag Added: - Default host target detection for automatic target overrides - Unit tests for target normalization Improved: - Config value lookup optimization - Documentation for Windows cross-compilation ## [0.5.0] - 2026-04-10 Added: - Full inheritance system for all config sections: `build`, `toolchain`, `run`, `workspace`, `dependencies` - Order: `section.target.profile` → `section.profile.target` → `section.target` → `section.profile` → `section` - `inherit = false` to disable inheritance completely - Target-specific overrides: `[build.linux]`, `[toolchain.windows]`, `[run.macos]`, etc. - Cross-compilation support with `--target ` - Full target triples and short names (`linux`, `macos`, `windows`) - Target-specific config sections: `[build.]`, `[toolchain.]`, `[run.]` - Workspace and dependencies support target/profile inheritance - Multiple targets build: `[build.targets]` to build for multiple targets simultaneously - Target directory structure: `target///` (native or triple) - Updated documentation with cross-compilation guide and Arch Linux examples ## [0.4.0] - 2026-04-10 Added: - Test command: `dcr test` and `dcr tests` - Automatic compilation and linking for tests without manual configuration - `dcr test --init` creates test template and header - Test framework with EXPECT/SKIP macros in `dcr_test.h` - Improved test integration: added test CLI module and basic test suite - Documentation updates for testing functionality ## [0.3.0] - 2026-03-18 Added: - `dcr gen` command for IDE integration and build tool support - - `dcr gen project-info`: Output project metadata as JSON - - `dcr gen compile-commands`: Generate `compile_commands.json` for clangd and clang-tidy - - `dcr gen vscode`: Generate VS Code `.vscode/` integration (launch.json, tasks.json, settings.json) - - `dcr gen clion`: Generate JetBrains CLion `.idea/` integration (run configurations, build targets) - Full workspace support for all `gen` subcommands ## [0.2.10] - 2026-03-16 Added: - `build.steps` for pre-build generators (e.g., `moc`/`uic`/`rcc`) - `build.pkg_config` for `pkg-config`-driven cflags/ldflags resolution - `[toolchain]` support for `uic`, `moc`, `rcc` - Step command variables (`{uic}`, `{moc}`, `{rcc}`, `{cflags}`, `{stem}`, `{in}`, `{out}`) - `{profile}` placeholder support for dependency paths ## [0.2.9] - 2026-03-14 Added: - Header dependency tracking for fine-grained incremental builds (rebuilds when `#include` files change) - Complete internal rewrite of the builder module: merged duplicate compilation backends Changed: - `cflags` and `default_flags` no longer incorrectly leak to the linker stage in GCC/Clang - Reduced builder codebase size by over 20% while increasing reliability - Greatly expanded test suite with 34 new tests covering configuration, CLI errors, and path operations ## [0.2.8] - 2026-03-06 Added: - Workspace support (`[workspace]` with deps ordering) - `clean --all` for workspace members Changed: - Project root discovery for `build/run/clean` (searches parent dirs) - Workspace paths are excluded from root source scan - Build output now uses a Cargo-style `Compiling v` line - Build time now reports total time for the whole build stage (workspace included) - Cache hits are silent (no compile line when nothing is rebuilt) - Safer build cache: fingerprints include headers and resolved library files ## [0.2.7] - 2026-03-03 Added: - Toolchain overrides via `[toolchain]` and env (`DCR_*`) - ASM `.S` preprocessing via GCC/Clang (`-x assembler-with-cpp`) ## [0.2.6] - 2026-03-01 Added: - `sharedlib` build kind (shared library output) - ASM projects (`build.language = "asm"`) - NASM and GAS backends - `build.platform` architecture hint for `-march` / `/arch` - Basic CLI integration tests ## [0.2.5] - 2026-02-26 Added: - Incremental builds (object caching by mtime) - `build.kind` with `staticlib` support - Custom output directory via `build.target` ## [0.2.4] - 2026-02-22 Added: - Custom build flags: `build.cflags` and `build.ldflags` - Recursive source discovery inside `src/` - Path dependencies with auto include/lib resolution and `dcr.lock` generation (experimental) - Add docs/index.md and docs/dcr-toml.md ## [0.2.3] - 2026-02-21 Added: - Modular builders for `gcc`, `clang`, `msvc` - Platform-specific binary path generation (Linux/macOS/Windows) Changed: - Build configuration moved to `[build]` (`language`, `standard`, `compiler`) - `dcr.toml` formatting now includes the `[build]` section - Build uses built-in `debug/release` flags per compiler - Build compiles all `*.c/*.cpp` files in `src/` into a single binary (no incremental build) - Updated `dcr.toml` examples in documentation ## [0.2.2] - 2026-02-20 Changed: - Reworked `dcr.toml` handling: added read, validation, and edit through `core::config` - `new` and `init` use the new config creation logic - `build` and `run` now require `dcr.toml` and read `compiler` and `name` from it ## [0.2.1] - 2026-02-18 Changed: - Translated user-facing CLI messages to English - Unified error and warning output via `utils::log::{error, warn}` - Updated `--help` output: translated headers and examples to English, used `printc`, and applied `BOLD_*` styles - Translated installer script messages in `install.sh` and `install.ps1` to English ## [0.2.0] - 2026-02-17 Changed: - Project migrated from Python to Rust - CLI and commands (`new`, `init`, `build`, `run`, `clean`, `--help`, `--version`, `--update`) ported to Rust - Updated `--update` flag: added support for GNU/Linux, Windows, macOS - Updated `README.md`, `CONTRIBUTING.md`, and `install.sh` for the Rust implementation - Added `install.ps1` for Windows - Updated `install.sh` for GNU/Linux and macOS Added: - Added `install.ps1` for Windows - Support for GNU/Linux, Windows, macOS (x86_64/arm) Important: - Code was ported with neural networks; future versions will include bug fixes and logic changes ## [0.1.2] - 2026-02-12 Added: - Update command - `install.sh` install script and README instructions - `--version` flag Changed: - Improved CLI output, added colors, and updated `--help` - Updated project run/build handling in `run.py`/`build.py` ## [0.1.1] - 2026-02-11 Changed: - Updated `--help` - `main.py` now runs correctly when executed directly ## [0.1.0] - 2026-02-11 First public release. Added: - Base commands `new`, `init`, `build`, `run`, `clean` - Build profiles `debug` and `release` - `dcr.toml` and `src/main.c` templates