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

Список изменений

0.9.6 (2026-11-15)

  • Library artifact names — build.filename / build.extension now apply to staticlib and sharedlib: filename = "sct" produces libsct.a (libsct.lib on Windows), while an explicit extension sets the name exactly.
  • Non-conventional library linking — dependencies whose artifact cannot be expressed as -l\<name> (libfoo.a / foo.lib) are passed to the linker by exact path, including libraries built as workspace members.
  • Short OS section names — [build.windows], [build.linux.debug], and similar are accepted as aliases for the full target triple; the full triple still wins when both are present.
  • dcr run / dcr test — resolve the artifact from filename/extension, profile, and target, and link the project library by exact path when its name is not conventional.
  • dcr --update — expects versioned release assets dcr-\<triple>-\<version>[.exe], with the older unversioned names kept as a fallback.
  • dcrup tag resolution — VERSION@dev falls back to vVERSION when no -dev tag exists, and --build resolves pinned tags through git (honours DCRUP_REPO, needs no GitHub API).
  • dcrup installed-version handling — default/uninstall find a floating stable-\<version> install and pick the newest version numerically (0.10.0 > 0.9.5); uninstalling the active version switches the default to a remaining toolchain.
  • dcrup robustness — failed installs no longer leave empty toolchain directories behind, dcrup list hides entries without a binary, self-install is safe to re-run, and --no-modify-path also leaves the current session PATH untouched.
  • dcrup --quiet — warnings go to stderr so they cannot pollute captured values, while cargo/git errors are still shown.
  • Windows installs from bash — the .sh installer supports Git Bash/MSYS2/Cygwin with .exe assets and binaries, and list/show/which/default/uninstall honour the suffix.
  • Examples — examples/* are no longer submodules; they are local checkouts ignored via .gitignore.
  • Documentation — installation, self-update, environment variables, dcr.toml, and build profiles updated.

0.9.5 (2026-10-21)

  • Structured CLI output — shared helpers now provide Cargo-like human, plain, and JSON output modes.
  • Color and diagnostics policy — --color, NO_COLOR, --quiet, and --verbose are applied consistently across commands.
  • Build reporting — lifecycle events and compiler diagnostics are available as structured JSON events.
  • Output lab — sandbox scenarios cover help, lifecycle commands, compiler warnings/errors, stream capture, and broken pipes.

0.9.1 (2026-09-13)

  • pkg-config dependencies — declare fmt = { pkg-config = "fmt" } or multiple package names in [dependencies]; DCR applies .pc compiler/linker flags and records the resolved package in dcr.lock.
  • dcr add support for pkg-config — easily add system package dependencies with dcr add fmt pkg-config:fmt or dcr add openssl pkg:openssl,libcrypto.
  • dcr tree & IDE integration — pkg-config packages are marked in dcr tree and resolved into compiler flags in dcr gen (compile_commands.json).
  • Fixed dcr new in non-ASCII / spaced paths — initializing projects from folders with non-ASCII characters or spaces no longer fails validation.

0.9.0 (2026-08-31)

  • 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).
  • Complete Path/Git dependencies — DCR packages from path and git are built before their consumer. Git sources are cached in ~/.dcr/git, support branch/tag/rev, and record the exact commit in dcr.lock.
  • Build and prebuild modes — path and git dependencies can build a DCR package from dcr.toml or link existing include/lib/libs artifacts; mode = "build" / "prebuild" selects explicitly when both forms are present.
  • Prebuilt dependency examples — documentation now shows the dcr-math-lib Git repository and recommended build/prebuilt layouts for both git and path.
  • Transitive dependency builds and cycle reporting — DCR recursively builds DCR packages and reports a clear dependency chain for cycles.
  • Bare path arguments for dcr add — dcr add mylib ../mylib now works in addition to the explicit path: form.
  • Removed install.sh / install.ps1 / install_bsd.sh — superseded by dcrup.

0.8.5 (2026-08-08)

  • 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)

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/\<profile>/\<name> without the Linux triple segment.
  • Symlink/mount roots: best-effort canonicalize for root and compile database paths.

0.8.3 (2026-08-03)

Добавлено:

  • dcr run -- \<args>... — cargo-style argument forwarding after a bare --
    (dcr run --release -- --test_help). Applies to direct binary runs and [run].cmd.
  • Tests — host target section ldflags without CLI --target; run-arg forwarding; split_double_dash unit tests.

Изменено:

  • Native builds resolve the host triple — without --target / package build.target, host sections such as
    [build.x86_64-unknown-linux-gnu] apply again (cflags / ldflags / toolchain).
    Previously the target was empty and those sections were ignored while artifacts already used the host triple path.
  • Empty target — no more Unknown target '' warning.
  • dcr run --help / man dcr-run — document -- forwarding.

Исправлено:

  • Native artifact paths on Windows and macOS — without an explicit --target / build.target, artifacts use target/\<profile>, so dcr run and flat-bin find the build output.
  • Target-specific ldflags missing on native host builds (e.g. micro-lang + libsct-elf).
  • Spurious empty-target warning.

0.8.2 (2026-07-22)

Добавлено

  • Compile progress [N/M] — live TTY status line (compile pkg v0.1.0 [12/41]) so long mono-package builds do not look hung.
  • DCR status style — fixed-width verbs: project, compile, dep, ready, pack, done, run.
  • Cargo feature archive — optional FAT packing via fatfs (cargo build --features archive). Release CI builds with the feature; without it [archive] fails with a clear message.
  • Tests — flat_bin_nasm_build, package build.target without CLI --target, stricter workspace clean --all.
  • CI expansion — unit + integration on Linux/macOS/Windows, archive feature job, rust-cache, clippy default + all-features (see .github/workflows/ci.yml).

Изменено

  • No forced host triple from CLI — without --target, package/member build.target is honored (bare-metal / ISO post_steps paths).
  • Relative include/lib flags (-I, -i, -isystem, -idirafter, -L, -T) absolutized against the package root under workspace builds.
  • dcr clean --all — no spam for members without a local target/ (shared root target/).
  • error / warn — red / yellow on stderr; CLI fully English (Hint:).
  • Help / man — list add, lint, setup; unknown command exits with code 1.
  • Tool NotFound — linker not found: ld.lld … / {tool} not found … instead of raw os error 2.

0.8.1 (2026-07-20)

Added

  • build.kind = "flat-bin" — raw binary (default .bin) for OS-dev payloads:
    • NASM — -f bin → \<stem>.bin
    • FASM — direct output (format binary in source)
    • GAS / MASM / LLC — object → objcopy -O binary → \<stem>.bin
    • C/C++ — objects → freestanding link → objcopy -O binary → \<name>.bin
    • Requires llvm-objcopy / objcopy / gobjcopy except for NASM/FASM direct emit
  • [archive] section — FAT12/16/32 disk images after build (output, format, size, offset, label, bootsector, layout). From 0.8.2 requires feature archive.
  • Single-file build.roots — a root may be a single source or header file, not only a directory.

Changed

  • --force also re-runs build.steps and build.post_steps.
  • dcr run on workspace-only root — if [run].cmd is set, run that after build; otherwise delegate to a workspace member.

0.8.0 (2026-07-18)

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.\<lang>]) — introduced support for configuring language-specific compiler, standard, and flags (e.g. [build.c], [build.cxx], [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\<AtomicBool>) 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)

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)

Added

  • --vcs option for new and init commands — introduced explicit version control system selection via --vcs \<git|none>.
  • 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)

Added

  • default_target_triple() now respects target_env — Linux (gnu/musl) and Windows (msvc/gnu) use the correct environment instead of hardcoded values.

Исправлено

  • 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 (02.06.2026)

Added

  • --help для всех команд — dcr build --help, dcr run --help, dcr new --help, dcr init --help, dcr clean --help, dcr add --help, dcr fmt --help, dcr setup --help, dcr tree --help, dcr gen --help, dcr --update --help, dcr test --help. Во всех результатах вывода используются стилизованные заголовки (зелёного цвета) и строки с информацией об использовании (голубого цвета).
  • Справочные страницы — 12 страниц в формате troff в каталоге man/man1/: dcr.1, dcr-build.1, dcr-run.1, dcr-new.1, dcr-init.1, dcr-clean.1, dcr-add.1, dcr-test.1, dcr-gen.1, dcr-fmt.1, dcr-tree.1, dcr-setup.1.
  • Справочные страницы во всех пакетах — install.sh, install_bsd.sh, PKGBUILD из AUR, Debian (cargo-deb), RPM (cargo-generate-rpm), Nix (postInstall), Homebrew (ресурс), Snap, ресурсы релизов GitHub.
  • Проверка имени проекта — команды dcr init и dcr new теперь проверяют имена перед созданием файлов . Допускаются только буквы ASCII, цифры, символы _ и -.
  • Поля documentation и homepage — добавлены в файл Cargo.toml.
  • Оптимизации профиля релиза — opt-level = "z", LTO, codegen-units = 1, panic = "abort", strip = true для уменьшения размера бинарных файлов.
  • Платформы Linux i686, armv7, riscv64 — добавлены в рабочий процесс выпуска и скрипты установки.
  • Платформы Linux musl i686 и armv7 — скомпилированы с помощью zigbuild в системе непрерывной интеграции (CI).
  • Пакеты AUR — рабочий процесс публикации dcr-dev, dcr-dev-bin.
  • Публикация Snap — автоматическая публикация Snapcraft в рамках непрерывной интеграции (CI).
  • Значок Snap — в файле README.

Changed

  • validate_package_name стал общедоступным — его можно вызывать из команд CLI.
  • Таблица платформы README — реорганизована: варианты libc вынесены в отдельные строки по ОС, удалены лишние столбцы. Обновлен список архитектур Linux.
  • Вывод gen.rs без аргументов — теперь используется стилизованный вывод вместо необработанного eprintln!.
  • tree.rs, fmt.rs и setup.rs — теперь поддерживают аргументы для опции --help.
  • Команды установки из файла README — | bash → | sh для обеспечения совместимости с POSIX.

Fixed

  • dcr new \<invalid-name> создает каталог, а затем завершается с ошибкой — теперь проверка выполняется до начала любых операций с файлами.
  • dcr init при указании недопустимого имени каталога — то же исправление.
  • Отсутствующие справочные страницы в установленных пакетах — теперь поставляются во всех форматах.
  • Ложное срабатывание по букве диска Windows — в модуле анализа файлов зависимостей.
  • CRLF (\r\n) вызывает сбой в работе парсера зависимостей — теперь поддерживается обработка смешанных символов окончания строк.
  • Новая строка после обратного слеша не обработана — при обработке экранирующих символов в функции parse_d_file.

0.7.0 (01.06.2026)

Added

  • Поддержка целевых платформ OpenBSD и NetBSD — полная маршрутизация по платформам с динамически генерируемыми тройками целевых параметров с использованием std::env::consts::ARCH и std::env::consts::OS. Затрагивает команды build, run, clean и модуль платформы.
  • src/platform/bsd.rs — новый специальный модуль платформы BSD, общий для FreeBSD, OpenBSD и NetBSD, предоставляющий bin_path, lib_path, elf_path, efi_path и shared_lib_path.
  • Параметр конфигурации build.out_dir — настраиваемый каталог вывода, который переопределяет путь по умолчанию target/\<triple>/\<profile> для конечных артефактов. Поддерживается в build, run и при проверке конфигурации.
  • Команда dcr fmt — новая команда CLI, которая форматирует все исходные файлы C/C++ (*.c, *.cpp, *.h, *.hpp) в src/ и tests/ с помощью clang-format.
  • Инкрементальная компоновка — функция needs_link() в common.rs, которая проверяет, не является ли какой-либо объектный файл более новым, чем скомпонованный результат, пропуская ненужную повторную компоновку. Реализовано для всех бэкэндов (unix_cc, msvc, gas, nasm).
  • build.kind = «none» и «custom» — два новых типа проектов для специальных сценариев сборки, при которых не создается стандартный артефакт.
  • install_bsd.sh — специальный скрипт установки, совместимый с POSIX, для систем BSD (FreeBSD, OpenBSD, NetBSD) с режимами загрузки бинарных файлов и сборки из исходного кода.
  • Поддержка Linux ARM64 в install.sh — добавлено определение целевой тройки Linux:aarch64|Linux:arm64 для загрузки готовых бинарных файлов.
  • Обнаружение ОС BSD в install.sh — обнаружение FreeBSD, OpenBSD, NetBSD и определение целевой тройки.
  • rust-toolchain.toml — явное привязывание инструментария к каналу stable.
  • Интеграционные тесты — build_with_target_config (проверяет build.target = «linux») и build_with_out_dir (проверяет настраиваемый каталог вывода).
  • get_build_string_with_profile стал pub — чтобы run.rs мог определять конфигурацию настраиваемого каталога вывода.

Changed

  • Изменена семантика build.target — теперь строго содержит тройку целей (например, x86_64-unknown-linux-gnu) или короткое имя (linux, macos, windows). Больше не используется в качестве пользовательского каталога вывода — эта функциональность перенесена в build.out_dir.
  • build.standard стал опциональным — изменен с String на Option\<String>. Проверка обеспечивает только непустоту для языков, отличных от ASM. Пропускается в выводе dcr.toml, если пуст.
  • dcr run с out_dir — теперь определяет целевой каталог с учетом build.out_dir, если он настроен, через get_build_string_with_profile() из build.rs.
  • collect_sources() возвращает пустой вектор вместо ошибки, если не найдено ни одного исходного файла, что позволяет проектам с kind = «none» или kind = «custom» не иметь исходных файлов.
  • Рефакторинг рабочего процесса выпуска CI/CD — git2 стал целевым (без vendored-openssl на Windows), кросс-компиляция на основе Zig для целей Linux, отличных от x86_64, очистка версий пакетов Arch Linux (тире → точки), символьная ссылка gmake для NetBSD.
  • Таблица совместимости README — статус сборки/работы на FreeBSD, OpenBSD, NetBSD повышен с «сообщество/по возможности» до «официально поддерживается».
  • Обновлена документация — build-section.md описывает новые поля build.target и build.out_dir. target-directory.md переписан для уточнения различия.

Fixed

  • stdout/stderr dcr run не наследуются — вывод дочернего процесса захватывался и выводился вручную, что приводило к сбоям интерактивных программ. Исправлено путем перехода на Command::status().
  • Условие гонки в CI релиза — задания матрицы сборки могли загружать ресурсы в релиз, который еще не существовал. Исправлено добавлением специального задания create-release.
  • Релиз GHA — переопределение стабильного набора инструментов — устранены проблемы с переопределением набора инструментов Rust в CI.
  • Очистка версий пакетов Arch Linux — строки версий с дефисами (например, 0.7.0-dev) являются недопустимыми для pkgver в Arch Linux. Исправлено путем замены дефисов точками.
  • Права доступа GPG после Docker — операции Docker изменяли владельца каталога GPG. Исправлено путем запуска chown после команд Docker.
  • Пути к артефактам пакетов RPM — артефакты RPM размещались в rpm/x86_64/ вместо fedora/x86_64/. Исправлено в рабочем процессе Dexoron Packages Index.
  • Надежность разбора JSON в install.sh — добавлен jq в качестве основного парсера с резервным вариантом python3 для поиска релизов в канале dev.

Удалено:

  • Вспомогательная функция format_roots() — удалена из common.rs. Использовалась только старым путем обработки ошибок в collect_sources().
  • Отдельные шаги загрузки артефактов для каждой дистрибуции — три отдельных шага actions/download-artifact заменены на унифицированный gh release download --clobber.