From 87b9828511562926078380347391afa72e78356c Mon Sep 17 00:00:00 2001 From: Dexoron Date: Tue, 21 Jul 2026 18:17:00 +0800 Subject: [PATCH] New translations dcr-toml.mdx (Polish) [ci skip] --- .../pl-PL/docs/reference/dcr-toml.mdx.mdx | 147 ++++++++++++++---- 1 file changed, 116 insertions(+), 31 deletions(-) diff --git a/docs-crowdin-export/pl-PL/docs/reference/dcr-toml.mdx.mdx b/docs-crowdin-export/pl-PL/docs/reference/dcr-toml.mdx.mdx index 43a6853..240399b 100644 --- a/docs-crowdin-export/pl-PL/docs/reference/dcr-toml.mdx.mdx +++ b/docs-crowdin-export/pl-PL/docs/reference/dcr-toml.mdx.mdx @@ -33,6 +33,9 @@ Main project configuration file. Located at the project root. [run] # run settings + +[archive] +# optional: pack FAT disk image after build ``` ## [package] @@ -60,36 +63,36 @@ author = "John Doe" * `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"` (optional, defaults to `"c"`) | -| `standard` | `"c11"` | C standard (`c11`, `c17`, `c23`) | -| `cxx_standard` | — | C++ standard (`c++17`, `c++20`, `c++23`) | -| `compiler` | `"clang"` | Preferred compiler (optional, defaults to `"clang"`) | -| `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 (no `language`/`compiler` required) | -| `freestanding` | `false` | Compile in freestanding mode (`-ffreestanding` + `-nostdlib -static`) | -| `opt_level` | — | Optimization level: `0`-`3`, `"s"`, `"z"` (derived from profile if omitted) | -| `debug` | profile-based | Emit debug symbols (`-g`): `true` in debug, `false` in release | -| `lto` | `false` | Link-time optimization (`-flto` for both compiler and linker) | -| `strip` | `false` | Strip symbols from output (`-s` in ldflags) | -| `warnings` | `[]` | Warning flags (e.g. `"all"`, `"extra"`, `"pedantic"`); engine adds `-Wall -Wextra` in debug if empty | -| `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) | +| Field | Default | Description | +| ---------------- | ------------- | --------------------------------------------------------------------------------------------------------- | +| `language` | `"c"` | `"c"`, `"c++"`, `"cpp"`, `"cxx"`, `"asm"`, `"llvm_ir"`, `"llvm-ir"`, `"ll"` (optional, defaults to `"c"`) | +| `standard` | `"c11"` | C standard (`c11`, `c17`, `c23`) | +| `cxx_standard` | — | C++ standard (`c++17`, `c++20`, `c++23`) | +| `compiler` | `"clang"` | Preferred compiler (optional, defaults to `"clang"`) | +| `kind` | `"bin"` | `bin`, `staticlib`, `sharedlib`, `efi`, `elf`, `none`, `custom`, `flat-bin` | +| `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 (for `flat-bin`, default is `bin`) | +| `roots` | `["src"]` | Source roots: directories and/or individual source/header files | +| `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 (no `language`/`compiler` required) | +| `freestanding` | `false` | Compile in freestanding mode (`-ffreestanding` + `-nostdlib -static`) | +| `opt_level` | — | Optimization level: `0`-`3`, `"s"`, `"z"` (derived from profile if omitted) | +| `debug` | profile-based | Emit debug symbols (`-g`): `true` in debug, `false` in release | +| `lto` | `false` | Link-time optimization (`-flto` for both compiler and linker) | +| `strip` | `false` | Strip symbols from output (`-s` in ldflags) | +| `warnings` | `[]` | Warning flags (e.g. `"all"`, `"extra"`, `"pedantic"`); engine adds `-Wall -Wextra` in debug if empty | +| `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): @@ -97,7 +100,7 @@ Settings from raw config (not in typed struct): * `ldscript` — linker script path * `build.steps` / `build.post_steps` — codegen steps -## Per-language overrides: `[build.c]`, `[build.cxx]`, `[build.asm]` +## Per-language overrides: `[build.c]`, `[build.cxx]`, `[build.asm]`, `[build.llvm_ir]` Each language can have its own table that overrides the flat `[build]` settings: @@ -117,6 +120,9 @@ compiler = "g++" [build.asm] compiler = "nasm" flags = ["-felf64"] + +[build.llvm_ir] +compiler = "llc" ``` The flat `[build]` acts as fallback; per-language tables take precedence for their language. @@ -174,3 +180,82 @@ Default `cmd` = `./target/{profile}/{name}` (macOS/Windows) or `./target/\.bin` | +| FASM | `compiler = "fasm"` | direct write (use `format binary` in source) | +| GAS | `compiler = "as"` / `"gas"` | assemble → `objcopy -O binary` | +| MASM | `compiler = "ml"` / `"ml64"` | assemble → `objcopy -O binary` | +| LLC | `language = "llvm_ir"`, `compiler = "llc"` | `-filetype=obj` → `objcopy -O binary` | + +```toml +[build] +language = "asm" +compiler = "nasm" +kind = "flat-bin" +extension = "bin" +roots = ["src/boot.asm"] +``` + +### C / C++ + +Compile all sources, link with `-nostdlib -static` (plus your `ldflags` / `ldscript`), then convert the intermediate ELF/PE with `objcopy -O binary` to `\.bin`. + +```toml +[build] +language = "c" +compiler = "clang" +kind = "flat-bin" +freestanding = true +filename = "kernel" +extension = "bin" +ldscript = "linker.ld" +ldflags = ["-T", "linker.ld"] +``` + +Notes: + +* Multi-file **ASM** packages emit one `\.bin` per source; **C/C++** emit a single project binary. +* `objcopy` tools tried in order: `llvm-objcopy`, `objcopy`, `gobjcopy`. +* Incompatible with `build.qt = true`. +* `dcr run` rejects `flat-bin` (not a host executable).