Files
dcr/docs-crowdin-export/ru-RU/docs/commands/build-commands.mdx.mdx
2026-07-21 18:18:13 +08:00

48 lines
1.5 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
sidebar_label: Команды сборки (build, run, clean)
---
# Команды сборки
## `dcr build`
Собирает проект по `dcr.toml`.
```bash
dcr build # debug profile
dcr build --release # release build
dcr build --debug # explicit debug
dcr build --target aarch64-unknown-linux-gnu
dcr build --force # full rebuild (also re-runs build.steps / post_steps)
dcr build --clean # clean + build
dcr build --verbose # show compilation commands
dcr build --workspace pkg-a # build specific workspace package
```
Артефакты: `target/\<triple>/\<profile>/\<binary-name>` (Linux с явным целевым объектом).
With `[archive]` in `dcr.toml`, a FAT disk image is packed after a successful build.
## `dcr run`
Собирает (если исходники новее артефакта) и запускает бинарник.
```bash
dcr run
dcr run --release
dcr run --force # force rebuild then run
```
On a **workspace-only** root: if `[run].cmd` is set, that command is used after build; otherwise DCR delegates to a workspace member.
## `dcr clean`
Удаляет директорию `target/`(или `target/\<target>/\<profile>`).
```bash
dcr clean
dcr clean --release # очистить target/release/
dcr clean --target windows # очистить target/x86_64-pc-windows-msvc/
dcr clean --all # очистить все пакеты workspace
```