From bebda1fe8afaaf275c0508e42703691221151ca9 Mon Sep 17 00:00:00 2001 From: Dexoron Date: Tue, 7 Jul 2026 11:22:06 +0800 Subject: [PATCH] New translations dcr-toml.mdx (Russian) [ci skip] --- .../ru-RU/docs/reference/dcr-toml.mdx.mdx | 152 ++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 docs-crowdin-export/ru-RU/docs/reference/dcr-toml.mdx.mdx diff --git a/docs-crowdin-export/ru-RU/docs/reference/dcr-toml.mdx.mdx b/docs-crowdin-export/ru-RU/docs/reference/dcr-toml.mdx.mdx new file mode 100644 index 0000000..29ca0b0 --- /dev/null +++ b/docs-crowdin-export/ru-RU/docs/reference/dcr-toml.mdx.mdx @@ -0,0 +1,152 @@ +--- +sidebar_label: dcr.toml overview +--- + +# dcr.toml + +Main project configuration file. Located at the project root. + +## Structure + +```toml +[package] +# required fields + +[build] +# build settings + +[build.debug] # optional: debug override +[build.release] # optional: release override + +[build.linux] # optional: Linux override +[build.windows] # optional: Windows override +[build.windows.debug] # target + profile combination + +[toolchain] +# compiler/linker paths + +[dependencies] +# project dependencies + +[workspace] +# multi-package configuration + +[run] +# run settings +``` + +## [package] + +| Field | Required | Description | +| --------- | -------- | ----------------------- | +| `name` | yes | Project name | +| `version` | yes | Semantic version | +| `type` | yes | `app`, `lib`, `none` | +| `license` | no | SPDX license identifier | +| `author` | no | Author | + +```toml +[package] +name = "my-app" +version = "0.1.0" +type = "app" +license = "MIT" +author = "John Doe" +``` + +## [build] + +... + +* `build.qt` — (bool) Enable automatic Qt meta-object handling (MOC, UIC, RCC). Requires `qt6` modules installed via `pkg-config`. + +| Field | Default | Description | +| ---------------- | ------------------------------------------- | --------------------------------------------------------------------- | +| `language` | `"c"` | `"c"`, `"c++"`, `"cpp"`, `"cxx"`, `"asm"` | +| `standard` | `"c11"` | C standard (`c11`, `c17`, `c23`) | +| `cxx_standard` | `"c++20"` | C++ standard (`c++17`, `c++20`, `c++23`) | +| `compiler` | `"clang"` | Preferred compiler | +| `kind` | `"bin"` | `bin`, `staticlib`, `sharedlib`, `efi`, `elf`, `none`, `custom` | +| `target` | host | Target triple for cross-compilation | +| `platform` | `"native"` | `native`, `efi` | +| `cflags` | `[]` | Additional C/C++/ASM flags | +| `ldflags` | `[]` | Additional linker flags | +| `filename` | `""` | Custom output file name | +| `extension` | `""` | Custom file extension | +| `roots` | `["src"]` | Source root directories | +| `exclude` | `[]` | Exclude patterns | +| `include` | `[]` | Additional include directories | +| `src_disable` | `false` | Disable auto source discovery | +| `inherit` | `false` | Inherit build from workspace root | +| `clean` | `[]` | Glob patterns for custom clean paths | +| `out_dir` | `""` | Custom output directory | +| `workspace_only` | `false` | Workspace-only, not built standalone | +| `freestanding` | `false` | Compile in freestanding mode (`-ffreestanding` + `-nostdlib -static`) | +| `opt_level` | `"0"` (debug) / `"3"` (release) | Optimization level: `0`-`3`, `"s"`, `"z"` | +| `debug` | `true` (debug) / `false` (release) | Emit debug symbols (`-g`) | +| `lto` | `false` | Link-time optimization (`-flto` for both compiler and linker) | +| `strip` | `false` | Strip symbols from output (`-s` in ldflags) | +| `warnings` | `["all", "extra"]` (debug) / `[]` (release) | Warning flags (e.g. `"all"`, `"extra"`, `"pedantic"`) | +| `panic` | `""` | Panic strategy: `"abort"` disables exceptions and unwind tables | +| `codegen-units` | `""` | Max parallel compilation jobs (`"0"` = auto) | +| `qt` | `false` | Enable automatic Qt meta-object handling (MOC, UIC, RCC) | + +Settings from raw config (not in typed struct): + +* `pkg_config` — list of pkg-config packages +* `ldscript` — linker script path +* `build.steps` / `build.post_steps` — codegen steps + +Example: + +```toml +[build] +language = "c++" +standard = "c23" +cxx_standard = "c++23" +compiler = "clang" +kind = "sharedlib" +cflags = ["-Wall", "-Wextra"] +opt_level = "z" +lto = true +strip = true +panic = "abort" +codegen-units = "2" +``` + +## [toolchain] + +```toml +[toolchain] +cc = "/usr/bin/clang" +cxx = "/usr/bin/clang++" +as = "/usr/bin/as" +ar = "/usr/bin/ar" +ld = "/usr/bin/ld.lld" +``` + +Raw config also supports `uic`, `moc`, `rcc` for Qt codegen. + +## [dependencies] + +See [dependencies](/docs/reference/dependencies). + +## [run] + +```toml +[run] +cmd = "./target/{profile}/{name}" +``` + +Substitutions: + +* `{version}` — package version +* `{version_major}`, `{version_minor}`, `{version_patch}`, `{version_suffix}`, `{version_suffix_dash}` — version parts +* `{profile}` — debug / release +* `{name}` — package name + +Default `cmd` = `./target/{profile}/{name}` (macOS/Windows) or `./target/\/\/\` (Linux). + +## [workspace] + +See [workspaces](/docs/reference/workspaces).