DCR — Dexoron Cargo Realization

A Cargo-style build tool for C/C++ projects

CI GitHub Release Platform
AUR Crates.io Homebrew
GitHub Stars License: GPL-3.0

--- ## Why DCR? - **No boilerplate** — one config file, predictable structure - **Cargo-like workflow** — `build`, `run`, `clean`, `test`, `add`, `fmt` - **Cross-compilation** — full target triple support with short names - **IDE integration** — VS Code, CLion, `compile_commands.json` out of the box - **Dependencies** — path, git, and registry-based with lock file - **Man pages** — `man dcr` and per-command pages (`man dcr-build`, `man dcr-new`, etc.) --- ## Installation
Arch Linux (AUR) ```sh yay -S dcr ```
macOS/Linux(GNU) (Homebrew) ```sh brew tap dexoron/dexoron brew install dcr ```
Nix (flake) ```sh nix run github:dexoron/dcr # or install to profile: nix profile install github:dexoron/dcr ```
Cargo (crates.io) ```sh cargo install dcr ```
dcrup (Linux / macOS / BSD / Windows(Bash)) ```sh curl -fsSL https://sh.dcr-tool.ru | sh -s -- self-install export PATH="$HOME/.dcr/bin:$PATH" dcrup install stable # auto: cf → gh → sf → ya # dcrup install stable --mirror cf # CloudFlare CDN # dcrup install stable --mirror ya # Yandex CDN (RU) ```
dcrup (Windows PowerShell) ```powershell irm https://ps1.dcr-tool.ru | iex # or: # irm https://ps1.dcr-tool.ru -OutFile dcrup.ps1 # powershell -File .\dcrup.ps1 self-install # $env:Path += ";$env:USERPROFILE\.dcr\bin" dcrup install stable # auto: cf → gh → sf → ya # dcrup install stable --mirror cf # CloudFlare CDN # dcrup install stable --mirror ya # Yandex CDN (RU) ```
Snap (Linux) > Snap Store publishing temporarily disabled — see [#51671](https://forum.snapcraft.io/t/classic-confinement-request-for-dcrup/51671). > Download the `.snap` from [GitHub Releases](https://github.com/dexoron/dcr/releases/latest) and install manually: ```sh sudo snap install --classic --dangerous dcrup_*.snap ```
From source ```sh git clone https://github.com/dexoron/dcr.git cd dcr && cargo build --release --features archive ln -sf "$PWD/target/release/dcr" ~/.local/bin/dcr ```
--- ## Quick Start ```sh dcr new hello cd hello dcr run ``` **Project structure:** ``` hello/ ├── dcr.toml # project config └── src/ └── main.c ``` --- ## dcr.toml Example ```toml [package] name = "hello" version = "0.1.0" [build] language = "c" standard = "c11" compiler = "clang" kind = "bin" [dependencies] ``` --- ## Base Commands | Command | Description | |---|---| | `dcr new ` | Create a new project | | `dcr init` | Initialize current directory | | `dcr add ` | Add a dependency | | `dcr build [--release]` | Build the project | | `dcr run [--release]` | Build and run | | `dcr clean` | Remove build artifacts | | `dcr test` | Run project tests | | `dcr fmt` | Format C/C++ sources (clang-format) | | `dcr tree` | View dependency tree | | `dcr gen ` | Generate IDE integration | | `dcr setup` | Initialize DCR registry | other in [docs/](docs/), `dcr --help` and `dcr --help` --- ## Platforms (pre-built binary)
| OS | x86_64 | aarch64 | armv7 | i686 | riscv64 | |:---:|:---:|:---:|:---:|:---:|:---:| | Linux (GNU) | ✅ | ✅ | ✅ | ✅ | ✅ | | Linux (Musl) | ✅ | ✅ | ✅ | ✅ | 🚧 | | macOS | ✅ | ✅ | ❌ | ❌ | ❌ | | Windows (MSVC) | ✅ | ✅ | ❌ | ✅ | ❌ | | Windows (MinGW) | ✅ | 🚧 | ❌ | ❌ | ❌ | | FreeBSD | ✅ | 🚧 | ❌ | ❌ | ❌ | | OpenBSD | ✅ | 🚧 | ❌ | ❌ | ❌ | | NetBSD | ✅ | 🚧 | ❌ | ❌ | ❌ | ✅ pre-built binary · 🚧 planned · ❌ not supported by platform or CI
--- ## Documentation Full docs at **[dcr.dexoron.su](https://dcr.dexoron.su)** or in the [`docs/`](docs/) directory. --- ## Repository Mirrors The primary repository is hosted on GitHub. Source and release mirrors: | Region | Mirror | Contents | |---|---|---| | Worldwide | [GitHub](https://github.com/dexoron/dcr) | Source code and releases | | Worldwide | [SourceForge](https://sourceforge.net/projects/dcr-tool/) | Source code and releases | | Russia | [GitVerse](https://gitverse.ru/dcr_labs/dcr) | Source code | | Russia | [SourceCraft](https://sourcecraft.dev/dexoron-dev/dcr) | Source code | Release CDN (used by `dcrup`): | Code | Host | Role | |---|---|---| | `cf` | [cdn-global.dcr-tool.ru](https://cdn-global.dcr-tool.ru) (CloudFlare) | Worldwide CDN | | `gh` | GitHub Releases | Primary host | | `sf` | SourceForge | Worldwide fallback | | `ya` | [cdn-ru.dcr-tool.ru](https://cdn-ru.dcr-tool.ru) (Yandex) | Paid RU fallback for restrictions | `dcrup install` defaults to `--mirror auto` and tries **cf → gh → sf → ya**. Override with `--mirror cf|gh|sf|ya` or `DCRUP_MIRROR`. --- ## VS Code Extension Install the recommended [DCR extension by Dexoron-Labs](https://marketplace.visualstudio.com/items?itemName=Dexoron-Labs.dcr) for VS Code. Do not install Microsoft C/C++ extensions for DCR projects; DCR uses `clangd` instead. If you need debugging with Microsoft's debugger, use MS C/C++ only for its debugger component. Recommended companion extensions: - [Even Better TOML](https://marketplace.visualstudio.com/items?itemName=tamasfe.even-better-toml) - [CodeLLDB](https://marketplace.visualstudio.com/items?itemName=vadimcn.vscode-lldb), or MS C/C++ for debugger support only --- ## Contributors
| | Name | Role | GitHub | |:---:|---|---|---| | 👤 | Dexoron (Bezotechestvo Vladimir) | Maintainer, Creator | [@dexoron](https://github.com/dexoron) | | 👤 | Kai | Maintainer | [@peoplemiau1](https://github.com/peoplemiau1) |
--- ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md). Before a PR: ```sh cargo fmt --all cargo clippy --all-targets --all-features -- -D warnings cargo test ``` ---
GPL-3.0 — see [LICENSE](LICENSE)
DCR is a build tool, not a library. The GPL applies only to DCR's own source code, not to projects built with it.
Made with ❤️ by [Dexoron](https://github.com/dexoron) and contributors.