# DCR — Dexoron Cargo Realization **A Cargo-style build tool for C/C++ projects** [![CI](https://github.com/dexoron/dcr/actions/workflows/ci.yml/badge.svg)](https://github.com/dexoron/dcr/actions/workflows/ci.yml) [![GitHub Release](https://img.shields.io/github/v/release/dexoron/dcr)](https://github.com/dexoron/dcr/releases/latest) [![Platform](https://img.shields.io/badge/platform-linux%20%7C%20macos%20%7C%20windows-lightgrey)](https://github.com/dexoron/dcr/releases)
[![AUR](https://img.shields.io/aur/version/dcr)](https://aur.archlinux.org/packages/dcr) [![Crates.io](https://img.shields.io/crates/v/dcr)](https://crates.io/crates/dcr) [![Homebrew](https://img.shields.io/badge/homebrew-dexoron%2Fdexoron-orange)](https://github.com/dexoron/homebrew-dexoron) [![Snap](https://img.shields.io/badge/snap-dcrup-orange)](https://snapcraft.io/dcrup)
[![GitHub Stars](https://img.shields.io/github/stars/dexoron/dcr?style=flat)](https://github.com/dexoron/dcr/stargazers) [![License: GPL-3.0](https://img.shields.io/badge/License-GPL--3.0-blue.svg)](LICENSE)
--- ## 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
Linux (Dexoron Packages) See https://dcr.dexoron.su for settings youre packages manager **Arch Linux:** ```sh sudo pacman -Sy dcr ``` **Debian/Ubuntu:** ```sh sudo apt update && sudo apt install dcr ``` **Fedora/RHEL:** ```sh sudo dnf install dcr ```
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 ```
Linux / macOS (script) ```sh curl -fsSL https://dcr.dexoron.su/install.sh | sh ```
BSD (script) ```sh curl -fsSL https://dcr.dexoron.su/install_bsd.sh | sh ```
Snap (Linux) ```sh sudo snap install dcrup ```
Windows (PowerShell) ```powershell irm https://dcr.dexoron.su/install.ps1 | iex ```
From source ```sh git clone https://github.com/dexoron/dcr.git cd dcr && cargo build --release 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 | ✅ | ❌ | ❌ | ❌ | ❌ | ✅ officially supported · ❌ not supported
--- ## Documentation Full docs at **[dcr.dexoron.su](https://dcr.dexoron.su)** or in the [`docs/`](docs/) directory. --- ## 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)
Made with ❤️ by [Dexoron](https://github.com/dexoron) and contributors.