mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-23 22:39:16 +00:00
Compare commits
28 Commits
80c87539f5
...
l10n_maste
| Author | SHA1 | Date | |
|---|---|---|---|
| 87406928ff | |||
| 78ad3bf3d8 | |||
| 0d8830edc5 | |||
| b087f24b83 | |||
| 238aaae9d4 | |||
| 4bc037a159 | |||
| 400f1d0e7b | |||
| 471a008721 | |||
| 5610b5de38 | |||
| bc55b9f50a | |||
| 7fbf5e466f | |||
| 86c0154c93 | |||
| 000ad89798 | |||
| 2c7ca13775 | |||
| 8fd2dd00d2 | |||
| 8c3fbf4d80 | |||
| cd566872db | |||
| 864cd0565e | |||
| 706131ea57 | |||
| 0b461ac906 | |||
| 2a777d1124 | |||
| 3200d7f719 | |||
| 543099e934 | |||
| 07e8776bf8 | |||
| e516f17704 | |||
| 2bc37d5960 | |||
| ddd06b4b06 | |||
| 46356739e9 |
@@ -4,6 +4,20 @@ sidebar_label: Changelog
|
|||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.9.5 (2026-10-21)
|
||||||
|
|
||||||
|
* **Structured CLI output** — shared helpers now provide Cargo-like human, plain, and JSON output modes.
|
||||||
|
* **Color and diagnostics policy** — `--color`, `NO_COLOR`, `--quiet`, and `--verbose` are applied consistently across commands.
|
||||||
|
* **Build reporting** — lifecycle events and compiler diagnostics are available as structured JSON events.
|
||||||
|
* **Output lab** — sandbox scenarios cover help, lifecycle commands, compiler warnings/errors, stream capture, and broken pipes.
|
||||||
|
|
||||||
|
## 0.9.1 (2026-09-13)
|
||||||
|
|
||||||
|
* **`pkg-config` dependencies** — declare `fmt = { pkg-config = "fmt" }` or multiple package names in `[dependencies]`; DCR applies `.pc` compiler/linker flags and records the resolved package in `dcr.lock`.
|
||||||
|
* **`dcr add` support for `pkg-config`** — easily add system package dependencies with `dcr add fmt pkg-config:fmt` or `dcr add openssl pkg:openssl,libcrypto`.
|
||||||
|
* **`dcr tree` & IDE integration** — `pkg-config` packages are marked in `dcr tree` and resolved into compiler flags in `dcr gen` (`compile_commands.json`).
|
||||||
|
* **Fixed `dcr new` in non-ASCII / spaced paths** — initializing projects from folders with non-ASCII characters or spaces no longer fails validation.
|
||||||
|
|
||||||
## 0.9.0 (2026-08-31)
|
## 0.9.0 (2026-08-31)
|
||||||
|
|
||||||
* **Download mirrors in `dcrup`** — `--mirror auto|cf|gh|sf|ya` and `DCRUP_MIRROR`.
|
* **Download mirrors in `dcrup`** — `--mirror auto|cf|gh|sf|ya` and `DCRUP_MIRROR`.
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ dcr add mylib path:./lib # explicit path prefix
|
|||||||
dcr add mylib git:https://github.com/user/repo # explicit git prefix
|
dcr add mylib git:https://github.com/user/repo # explicit git prefix
|
||||||
dcr add mylib github:user/repo # GitHub shorthand
|
dcr add mylib github:user/repo # GitHub shorthand
|
||||||
dcr add mylib gitlab:user/repo # GitLab shorthand
|
dcr add mylib gitlab:user/repo # GitLab shorthand
|
||||||
|
dcr add fmt pkg-config:fmt # system package via pkg-config
|
||||||
|
dcr add openssl pkg:openssl,libcrypto # multiple pkg-config packages
|
||||||
```
|
```
|
||||||
|
|
||||||
Source prefixes:
|
Source prefixes:
|
||||||
@@ -23,6 +25,7 @@ Source prefixes:
|
|||||||
* `git:` — generic git URL
|
* `git:` — generic git URL
|
||||||
* `github:` — expands to `https://github.com/\<user>/\<repo>`
|
* `github:` — expands to `https://github.com/\<user>/\<repo>`
|
||||||
* `gitlab:` — expands to `https://gitlab.com/\<user>/\<repo>`
|
* `gitlab:` — expands to `https://gitlab.com/\<user>/\<repo>`
|
||||||
|
* `pkg-config:` / `pkg:` — one or more packages resolved by `pkg-config`
|
||||||
* `http://` / `https://` / `git@` — full URL
|
* `http://` / `https://` / `git@` — full URL
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
@@ -33,6 +36,11 @@ Flags:
|
|||||||
|
|
||||||
If source is omitted — DCR searches connected registries. A bare relative or absolute path is accepted as a path dependency.
|
If source is omitted — DCR searches connected registries. A bare relative or absolute path is accepted as a path dependency.
|
||||||
|
|
||||||
|
For `pkg-config` dependencies, the referenced packages must already be installed
|
||||||
|
and provide `.pc` files. DCR invokes `pkg-config` during the build (using
|
||||||
|
`PATH` and `PKG_CONFIG_PATH`) and forwards the returned compiler and linker
|
||||||
|
flags; it does not download or build these packages.
|
||||||
|
|
||||||
## `dcr tree`
|
## `dcr tree`
|
||||||
|
|
||||||
Displays the project dependency tree.
|
Displays the project dependency tree.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Install and switch DCR versions (stable / dev / night, pin `0.8.2`, optional bui
|
|||||||
### Linux / macOS / BSD / Windows (bash)
|
### Linux / macOS / BSD / Windows (bash)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -fsSL https://sh.dcr-tool.ru | sh -s -- self-install
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.dcr-tool.ru | sh -s -- self-install
|
||||||
export PATH="$HOME/.dcr/bin:$PATH"
|
export PATH="$HOME/.dcr/bin:$PATH"
|
||||||
dcrup install stable
|
dcrup install stable
|
||||||
```
|
```
|
||||||
@@ -19,28 +19,19 @@ dcrup install stable
|
|||||||
Non-interactive install of DCR in one shot:
|
Non-interactive install of DCR in one shot:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -fsSL https://sh.dcr-tool.ru | sh -s -- install stable
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.dcr-tool.ru | sh -s -- install stable
|
||||||
export PATH="$HOME/.dcr/bin:$PATH"
|
export PATH="$HOME/.dcr/bin:$PATH"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows (PowerShell)
|
### Windows (PowerShell)
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
irm https://ps1.dcr-tool.ru | iex
|
& ([scriptblock]::Create((irm https://ps1.dcr-tool.ru))) self-install
|
||||||
# or download then run:
|
|
||||||
# irm https://ps1.dcr-tool.ru -OutFile dcrup.ps1
|
|
||||||
# powershell -File .\dcrup.ps1 self-install
|
|
||||||
# $env:Path += ";$env:USERPROFILE\.dcr\bin"
|
# $env:Path += ";$env:USERPROFILE\.dcr\bin"
|
||||||
dcrup install stable
|
dcrup install stable
|
||||||
```
|
```
|
||||||
|
|
||||||
Optional cmd bootstrap (if you prefer `curl` of the cmd shim):
|
After `self-install`, the command is **`dcrup`** (no `.sh` / `.ps1`) and is installed in `~/.dcr/bin` (Unix) or `%USERPROFILE%\.dcr\bin` (Windows).
|
||||||
|
|
||||||
```bat
|
|
||||||
curl -fsSL -o dcrup.cmd https://cmd.dcr-tool.ru
|
|
||||||
```
|
|
||||||
|
|
||||||
After `self-install`, the command is **`dcrup`** (no `.sh` / `.ps1`): shims live in `~/.dcr/bin` (Unix) or `%USERPROFILE%\.dcr\bin` (Windows `dcrup.cmd`).
|
|
||||||
|
|
||||||
### Common dcrup commands
|
### Common dcrup commands
|
||||||
|
|
||||||
@@ -58,6 +49,8 @@ dcrup update
|
|||||||
dcrup list
|
dcrup list
|
||||||
dcrup show
|
dcrup show
|
||||||
dcrup which
|
dcrup which
|
||||||
|
dcrup uninstall 0.8.2 # remove one installed version
|
||||||
|
dcrup uninstall --all # remove all installed versions
|
||||||
```
|
```
|
||||||
|
|
||||||
Layout: `~/.dcr/toolchains/\<id>/dcr` and `~/.dcr/bin/dcr` → active version.
|
Layout: `~/.dcr/toolchains/\<id>/dcr` and `~/.dcr/bin/dcr` → active version.
|
||||||
|
|||||||
34
docs-crowdin-export/de-DE/docs/reference/cli-output.mdx.mdx
Normal file
34
docs-crowdin-export/de-DE/docs/reference/cli-output.mdx.mdx
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
sidebar_label: CLI output
|
||||||
|
---
|
||||||
|
|
||||||
|
# CLI output (experimental)
|
||||||
|
|
||||||
|
The structured output implementation is being developed incrementally.
|
||||||
|
Currently these global options apply to diagnostics emitted through the logger:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
dcr --output plain build
|
||||||
|
dcr --output json build
|
||||||
|
dcr --color never build
|
||||||
|
dcr --quiet build
|
||||||
|
dcr --verbose build
|
||||||
|
```
|
||||||
|
|
||||||
|
`--output` accepts `human` (default), `plain`, or `json`.
|
||||||
|
Diagnostics are written to stderr. JSON diagnostics are newline-delimited objects
|
||||||
|
with `schema_version: 1`, `event`, and `message` fields. Command statuses use the
|
||||||
|
shared output helpers, build reporting emits structured lifecycle events, and
|
||||||
|
compiler output is represented as JSON events with its original stream and text.
|
||||||
|
The protocol is still experimental: some raw command data and subprocess stdout
|
||||||
|
remain unstructured.
|
||||||
|
|
||||||
|
`--color` accepts `auto`, `always`, or `never`. Automatic coloring requires a
|
||||||
|
terminal and respects `NO_COLOR`. Plain and JSON diagnostics never add colors.
|
||||||
|
Quiet mode preserves warnings, errors, and compiler diagnostics; verbose mode
|
||||||
|
enables debug and trace logging. Arguments following `--` are passed through
|
||||||
|
unchanged.
|
||||||
|
|
||||||
|
Remaining work includes migrating the remaining raw command data and subprocess
|
||||||
|
stdout, improving progress rendering and contextual errors, and expanding
|
||||||
|
integration coverage for stdout/stderr and closed pipes.
|
||||||
@@ -112,7 +112,12 @@ Never fails the command — warnings only. Pre-release suffixes (`1.0.0-dev`) ar
|
|||||||
|
|
||||||
Settings from raw config (not in typed struct):
|
Settings from raw config (not in typed struct):
|
||||||
|
|
||||||
* `pkg_config` — list of pkg-config packages
|
* `pkg_config` — list of packages queried for build-wide compiler/linker flags
|
||||||
|
|
||||||
|
Dependencies can also declare a system package directly, for example
|
||||||
|
`fmt = { pkg-config = "fmt" }`. This records the package in `dcr.lock` and applies
|
||||||
|
the flags returned by `pkg-config --cflags` and `pkg-config --libs`.
|
||||||
|
|
||||||
* `ldscript` — linker script path
|
* `ldscript` — linker script path
|
||||||
* `build.steps` / `build.post_steps` — codegen steps
|
* `build.steps` / `build.post_steps` — codegen steps
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ sidebar_label: Dependencies
|
|||||||
|
|
||||||
## Formats
|
## Formats
|
||||||
|
|
||||||
The `[dependencies]` section supports three formats:
|
The `[dependencies]` section supports registry, path, Git, and `pkg-config` dependencies:
|
||||||
|
|
||||||
### String (registry)
|
### String (registry)
|
||||||
|
|
||||||
@@ -44,6 +44,23 @@ names (`libs`):
|
|||||||
dcr-math = { path = "../deps/dcr-math", include = ["include"], lib = ["lib"], libs = ["dcr-math"] }
|
dcr-math = { path = "../deps/dcr-math", include = ["include"], lib = ["lib"], libs = ["dcr-math"] }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Table (`pkg-config`)
|
||||||
|
|
||||||
|
Use an installed `.pc` package when the library is provided by the operating system
|
||||||
|
or another system package manager. DCR invokes `pkg-config --cflags` and
|
||||||
|
`pkg-config --libs`, preserving include, library, linker, and other flags:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[dependencies]
|
||||||
|
fmt = { pkg-config = "fmt" }
|
||||||
|
openssl = { pkg-config = ["openssl", "libcrypto"] }
|
||||||
|
```
|
||||||
|
|
||||||
|
The `pkg-config` executable must be available in `PATH`. The named `.pc` files must
|
||||||
|
be available through pkg-config's standard search paths or via `PKG_CONFIG_PATH`.
|
||||||
|
These dependencies are not downloaded or built by DCR; they are recorded in
|
||||||
|
`dcr.lock` with a `pkg-config+...` source.
|
||||||
|
|
||||||
## Registry
|
## Registry
|
||||||
|
|
||||||
DCR uses a package registry for dependency lookup by name.
|
DCR uses a package registry for dependency lookup by name.
|
||||||
|
|||||||
@@ -4,6 +4,20 @@ sidebar_label: Changelog
|
|||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.9.5 (2026-10-21)
|
||||||
|
|
||||||
|
* **Structured CLI output** — shared helpers now provide Cargo-like human, plain, and JSON output modes.
|
||||||
|
* **Color and diagnostics policy** — `--color`, `NO_COLOR`, `--quiet`, and `--verbose` are applied consistently across commands.
|
||||||
|
* **Build reporting** — lifecycle events and compiler diagnostics are available as structured JSON events.
|
||||||
|
* **Output lab** — sandbox scenarios cover help, lifecycle commands, compiler warnings/errors, stream capture, and broken pipes.
|
||||||
|
|
||||||
|
## 0.9.1 (2026-09-13)
|
||||||
|
|
||||||
|
* **`pkg-config` dependencies** — declare `fmt = { pkg-config = "fmt" }` or multiple package names in `[dependencies]`; DCR applies `.pc` compiler/linker flags and records the resolved package in `dcr.lock`.
|
||||||
|
* **`dcr add` support for `pkg-config`** — easily add system package dependencies with `dcr add fmt pkg-config:fmt` or `dcr add openssl pkg:openssl,libcrypto`.
|
||||||
|
* **`dcr tree` & IDE integration** — `pkg-config` packages are marked in `dcr tree` and resolved into compiler flags in `dcr gen` (`compile_commands.json`).
|
||||||
|
* **Fixed `dcr new` in non-ASCII / spaced paths** — initializing projects from folders with non-ASCII characters or spaces no longer fails validation.
|
||||||
|
|
||||||
## 0.9.0 (2026-08-31)
|
## 0.9.0 (2026-08-31)
|
||||||
|
|
||||||
* **Download mirrors in `dcrup`** — `--mirror auto|cf|gh|sf|ya` and `DCRUP_MIRROR`.
|
* **Download mirrors in `dcrup`** — `--mirror auto|cf|gh|sf|ya` and `DCRUP_MIRROR`.
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ dcr add mylib path:./lib # explicit path prefix
|
|||||||
dcr add mylib git:https://github.com/user/repo # explicit git prefix
|
dcr add mylib git:https://github.com/user/repo # explicit git prefix
|
||||||
dcr add mylib github:user/repo # GitHub shorthand
|
dcr add mylib github:user/repo # GitHub shorthand
|
||||||
dcr add mylib gitlab:user/repo # GitLab shorthand
|
dcr add mylib gitlab:user/repo # GitLab shorthand
|
||||||
|
dcr add fmt pkg-config:fmt # system package via pkg-config
|
||||||
|
dcr add openssl pkg:openssl,libcrypto # multiple pkg-config packages
|
||||||
```
|
```
|
||||||
|
|
||||||
Source prefixes:
|
Source prefixes:
|
||||||
@@ -23,6 +25,7 @@ Source prefixes:
|
|||||||
* `git:` — generic git URL
|
* `git:` — generic git URL
|
||||||
* `github:` — expands to `https://github.com/\<user>/\<repo>`
|
* `github:` — expands to `https://github.com/\<user>/\<repo>`
|
||||||
* `gitlab:` — expands to `https://gitlab.com/\<user>/\<repo>`
|
* `gitlab:` — expands to `https://gitlab.com/\<user>/\<repo>`
|
||||||
|
* `pkg-config:` / `pkg:` — one or more packages resolved by `pkg-config`
|
||||||
* `http://` / `https://` / `git@` — full URL
|
* `http://` / `https://` / `git@` — full URL
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
@@ -33,6 +36,11 @@ Flags:
|
|||||||
|
|
||||||
If source is omitted — DCR searches connected registries. A bare relative or absolute path is accepted as a path dependency.
|
If source is omitted — DCR searches connected registries. A bare relative or absolute path is accepted as a path dependency.
|
||||||
|
|
||||||
|
For `pkg-config` dependencies, the referenced packages must already be installed
|
||||||
|
and provide `.pc` files. DCR invokes `pkg-config` during the build (using
|
||||||
|
`PATH` and `PKG_CONFIG_PATH`) and forwards the returned compiler and linker
|
||||||
|
flags; it does not download or build these packages.
|
||||||
|
|
||||||
## `dcr tree`
|
## `dcr tree`
|
||||||
|
|
||||||
Displays the project dependency tree.
|
Displays the project dependency tree.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Install and switch DCR versions (stable / dev / night, pin `0.8.2`, optional bui
|
|||||||
### Linux / macOS / BSD / Windows (bash)
|
### Linux / macOS / BSD / Windows (bash)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -fsSL https://sh.dcr-tool.ru | sh -s -- self-install
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.dcr-tool.ru | sh -s -- self-install
|
||||||
export PATH="$HOME/.dcr/bin:$PATH"
|
export PATH="$HOME/.dcr/bin:$PATH"
|
||||||
dcrup install stable
|
dcrup install stable
|
||||||
```
|
```
|
||||||
@@ -19,28 +19,19 @@ dcrup install stable
|
|||||||
Non-interactive install of DCR in one shot:
|
Non-interactive install of DCR in one shot:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -fsSL https://sh.dcr-tool.ru | sh -s -- install stable
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.dcr-tool.ru | sh -s -- install stable
|
||||||
export PATH="$HOME/.dcr/bin:$PATH"
|
export PATH="$HOME/.dcr/bin:$PATH"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows (PowerShell)
|
### Windows (PowerShell)
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
irm https://ps1.dcr-tool.ru | iex
|
& ([scriptblock]::Create((irm https://ps1.dcr-tool.ru))) self-install
|
||||||
# or download then run:
|
|
||||||
# irm https://ps1.dcr-tool.ru -OutFile dcrup.ps1
|
|
||||||
# powershell -File .\dcrup.ps1 self-install
|
|
||||||
# $env:Path += ";$env:USERPROFILE\.dcr\bin"
|
# $env:Path += ";$env:USERPROFILE\.dcr\bin"
|
||||||
dcrup install stable
|
dcrup install stable
|
||||||
```
|
```
|
||||||
|
|
||||||
Optional cmd bootstrap (if you prefer `curl` of the cmd shim):
|
After `self-install`, the command is **`dcrup`** (no `.sh` / `.ps1`) and is installed in `~/.dcr/bin` (Unix) or `%USERPROFILE%\.dcr\bin` (Windows).
|
||||||
|
|
||||||
```bat
|
|
||||||
curl -fsSL -o dcrup.cmd https://cmd.dcr-tool.ru
|
|
||||||
```
|
|
||||||
|
|
||||||
After `self-install`, the command is **`dcrup`** (no `.sh` / `.ps1`): shims live in `~/.dcr/bin` (Unix) or `%USERPROFILE%\.dcr\bin` (Windows `dcrup.cmd`).
|
|
||||||
|
|
||||||
### Common dcrup commands
|
### Common dcrup commands
|
||||||
|
|
||||||
@@ -58,6 +49,8 @@ dcrup update
|
|||||||
dcrup list
|
dcrup list
|
||||||
dcrup show
|
dcrup show
|
||||||
dcrup which
|
dcrup which
|
||||||
|
dcrup uninstall 0.8.2 # remove one installed version
|
||||||
|
dcrup uninstall --all # remove all installed versions
|
||||||
```
|
```
|
||||||
|
|
||||||
Layout: `~/.dcr/toolchains/\<id>/dcr` and `~/.dcr/bin/dcr` → active version.
|
Layout: `~/.dcr/toolchains/\<id>/dcr` and `~/.dcr/bin/dcr` → active version.
|
||||||
|
|||||||
34
docs-crowdin-export/pl-PL/docs/reference/cli-output.mdx.mdx
Normal file
34
docs-crowdin-export/pl-PL/docs/reference/cli-output.mdx.mdx
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
sidebar_label: CLI output
|
||||||
|
---
|
||||||
|
|
||||||
|
# CLI output (experimental)
|
||||||
|
|
||||||
|
The structured output implementation is being developed incrementally.
|
||||||
|
Currently these global options apply to diagnostics emitted through the logger:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
dcr --output plain build
|
||||||
|
dcr --output json build
|
||||||
|
dcr --color never build
|
||||||
|
dcr --quiet build
|
||||||
|
dcr --verbose build
|
||||||
|
```
|
||||||
|
|
||||||
|
`--output` accepts `human` (default), `plain`, or `json`.
|
||||||
|
Diagnostics are written to stderr. JSON diagnostics are newline-delimited objects
|
||||||
|
with `schema_version: 1`, `event`, and `message` fields. Command statuses use the
|
||||||
|
shared output helpers, build reporting emits structured lifecycle events, and
|
||||||
|
compiler output is represented as JSON events with its original stream and text.
|
||||||
|
The protocol is still experimental: some raw command data and subprocess stdout
|
||||||
|
remain unstructured.
|
||||||
|
|
||||||
|
`--color` accepts `auto`, `always`, or `never`. Automatic coloring requires a
|
||||||
|
terminal and respects `NO_COLOR`. Plain and JSON diagnostics never add colors.
|
||||||
|
Quiet mode preserves warnings, errors, and compiler diagnostics; verbose mode
|
||||||
|
enables debug and trace logging. Arguments following `--` are passed through
|
||||||
|
unchanged.
|
||||||
|
|
||||||
|
Remaining work includes migrating the remaining raw command data and subprocess
|
||||||
|
stdout, improving progress rendering and contextual errors, and expanding
|
||||||
|
integration coverage for stdout/stderr and closed pipes.
|
||||||
@@ -112,7 +112,12 @@ Never fails the command — warnings only. Pre-release suffixes (`1.0.0-dev`) ar
|
|||||||
|
|
||||||
Settings from raw config (not in typed struct):
|
Settings from raw config (not in typed struct):
|
||||||
|
|
||||||
* `pkg_config` — list of pkg-config packages
|
* `pkg_config` — list of packages queried for build-wide compiler/linker flags
|
||||||
|
|
||||||
|
Dependencies can also declare a system package directly, for example
|
||||||
|
`fmt = { pkg-config = "fmt" }`. This records the package in `dcr.lock` and applies
|
||||||
|
the flags returned by `pkg-config --cflags` and `pkg-config --libs`.
|
||||||
|
|
||||||
* `ldscript` — linker script path
|
* `ldscript` — linker script path
|
||||||
* `build.steps` / `build.post_steps` — codegen steps
|
* `build.steps` / `build.post_steps` — codegen steps
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ sidebar_label: Dependencies
|
|||||||
|
|
||||||
## Formats
|
## Formats
|
||||||
|
|
||||||
The `[dependencies]` section supports three formats:
|
The `[dependencies]` section supports registry, path, Git, and `pkg-config` dependencies:
|
||||||
|
|
||||||
### String (registry)
|
### String (registry)
|
||||||
|
|
||||||
@@ -44,6 +44,23 @@ names (`libs`):
|
|||||||
dcr-math = { path = "../deps/dcr-math", include = ["include"], lib = ["lib"], libs = ["dcr-math"] }
|
dcr-math = { path = "../deps/dcr-math", include = ["include"], lib = ["lib"], libs = ["dcr-math"] }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Table (`pkg-config`)
|
||||||
|
|
||||||
|
Use an installed `.pc` package when the library is provided by the operating system
|
||||||
|
or another system package manager. DCR invokes `pkg-config --cflags` and
|
||||||
|
`pkg-config --libs`, preserving include, library, linker, and other flags:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[dependencies]
|
||||||
|
fmt = { pkg-config = "fmt" }
|
||||||
|
openssl = { pkg-config = ["openssl", "libcrypto"] }
|
||||||
|
```
|
||||||
|
|
||||||
|
The `pkg-config` executable must be available in `PATH`. The named `.pc` files must
|
||||||
|
be available through pkg-config's standard search paths or via `PKG_CONFIG_PATH`.
|
||||||
|
These dependencies are not downloaded or built by DCR; they are recorded in
|
||||||
|
`dcr.lock` with a `pkg-config+...` source.
|
||||||
|
|
||||||
## Registry
|
## Registry
|
||||||
|
|
||||||
DCR uses a package registry for dependency lookup by name.
|
DCR uses a package registry for dependency lookup by name.
|
||||||
|
|||||||
@@ -4,6 +4,20 @@ sidebar_label: Список изменений
|
|||||||
|
|
||||||
# Список изменений
|
# Список изменений
|
||||||
|
|
||||||
|
## 0.9.5 (2026-10-21)
|
||||||
|
|
||||||
|
* **Structured CLI output** — shared helpers now provide Cargo-like human, plain, and JSON output modes.
|
||||||
|
* **Color and diagnostics policy** — `--color`, `NO_COLOR`, `--quiet`, and `--verbose` are applied consistently across commands.
|
||||||
|
* **Build reporting** — lifecycle events and compiler diagnostics are available as structured JSON events.
|
||||||
|
* **Output lab** — sandbox scenarios cover help, lifecycle commands, compiler warnings/errors, stream capture, and broken pipes.
|
||||||
|
|
||||||
|
## 0.9.1 (2026-09-13)
|
||||||
|
|
||||||
|
* **`pkg-config` dependencies** — declare `fmt = { pkg-config = "fmt" }` or multiple package names in `[dependencies]`; DCR applies `.pc` compiler/linker flags and records the resolved package in `dcr.lock`.
|
||||||
|
* **`dcr add` support for `pkg-config`** — easily add system package dependencies with `dcr add fmt pkg-config:fmt` or `dcr add openssl pkg:openssl,libcrypto`.
|
||||||
|
* **`dcr tree` & IDE integration** — `pkg-config` packages are marked in `dcr tree` and resolved into compiler flags in `dcr gen` (`compile_commands.json`).
|
||||||
|
* **Fixed `dcr new` in non-ASCII / spaced paths** — initializing projects from folders with non-ASCII characters or spaces no longer fails validation.
|
||||||
|
|
||||||
## 0.9.0 (2026-08-31)
|
## 0.9.0 (2026-08-31)
|
||||||
|
|
||||||
* **Download mirrors in `dcrup`** — `--mirror auto|cf|gh|sf|ya` and `DCRUP_MIRROR`.
|
* **Download mirrors in `dcrup`** — `--mirror auto|cf|gh|sf|ya` and `DCRUP_MIRROR`.
|
||||||
|
|||||||
@@ -9,12 +9,14 @@ sidebar_label: Команды зависимостей (add, tree)
|
|||||||
Добавляет зависимость в `dcr.toml`.
|
Добавляет зависимость в `dcr.toml`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
dcr add fmt # поиск в реестре
|
dcr add fmt # registry lookup
|
||||||
dcr add mylib ../path/to/lib # путь как источник
|
dcr add mylib ../path/to/lib # path as source
|
||||||
dcr add mylib path:./lib # явный префикс пути
|
dcr add mylib path:./lib # explicit path prefix
|
||||||
dcr add mylib git:https://github.com/user/repo # явный префикс git
|
dcr add mylib git:https://github.com/user/repo # explicit git prefix
|
||||||
dcr add mylib github:user/repo # сокращённая запись GitHub
|
dcr add mylib github:user/repo # GitHub shorthand
|
||||||
dcr add mylib gitlab:user/repo # сокращённая запись GitLab
|
dcr add mylib gitlab:user/repo # GitLab shorthand
|
||||||
|
dcr add fmt pkg-config:fmt # system package via pkg-config
|
||||||
|
dcr add openssl pkg:openssl,libcrypto # multiple pkg-config packages
|
||||||
```
|
```
|
||||||
|
|
||||||
Префиксы источника:
|
Префиксы источника:
|
||||||
@@ -23,6 +25,7 @@ dcr add mylib gitlab:user/repo # сокращённая запись GitLab
|
|||||||
* `git:` — URL адрес git-репозитория
|
* `git:` — URL адрес git-репозитория
|
||||||
* `github:` — расширение `https://github.com/\<user>/\<repo>`
|
* `github:` — расширение `https://github.com/\<user>/\<repo>`
|
||||||
* `gitlab:` — расширение `https://gitlab.com/\<user>/\<repo>`
|
* `gitlab:` — расширение `https://gitlab.com/\<user>/\<repo>`
|
||||||
|
* `pkg-config:` / `pkg:` — one or more packages resolved by `pkg-config`
|
||||||
* `http://` / `https://` / `git@` — полный URL
|
* `http://` / `https://` / `git@` — полный URL
|
||||||
|
|
||||||
Флаги:
|
Флаги:
|
||||||
@@ -33,6 +36,11 @@ dcr add mylib gitlab:user/repo # сокращённая запись GitLab
|
|||||||
|
|
||||||
Если источник не указан — DCR выполняет поиск в подключенных реестрах. A bare relative or absolute path is accepted as a path dependency.
|
Если источник не указан — DCR выполняет поиск в подключенных реестрах. A bare relative or absolute path is accepted as a path dependency.
|
||||||
|
|
||||||
|
For `pkg-config` dependencies, the referenced packages must already be installed
|
||||||
|
and provide `.pc` files. DCR invokes `pkg-config` during the build (using
|
||||||
|
`PATH` and `PKG_CONFIG_PATH`) and forwards the returned compiler and linker
|
||||||
|
flags; it does not download or build these packages.
|
||||||
|
|
||||||
## `dcr tree`
|
## `dcr tree`
|
||||||
|
|
||||||
Показывает дерево зависимостей проекта.
|
Показывает дерево зависимостей проекта.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Install and switch DCR versions (stable / dev / night, pin `0.8.2`, optional bui
|
|||||||
### Linux / macOS / BSD / Windows (bash)
|
### Linux / macOS / BSD / Windows (bash)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -fsSL https://sh.dcr-tool.ru | sh -s -- self-install
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.dcr-tool.ru | sh -s -- self-install
|
||||||
export PATH="$HOME/.dcr/bin:$PATH"
|
export PATH="$HOME/.dcr/bin:$PATH"
|
||||||
dcrup install stable
|
dcrup install stable
|
||||||
```
|
```
|
||||||
@@ -19,28 +19,19 @@ dcrup install stable
|
|||||||
Non-interactive install of DCR in one shot:
|
Non-interactive install of DCR in one shot:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -fsSL https://sh.dcr-tool.ru | sh -s -- install stable
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.dcr-tool.ru | sh -s -- install stable
|
||||||
export PATH="$HOME/.dcr/bin:$PATH"
|
export PATH="$HOME/.dcr/bin:$PATH"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows (PowerShell)
|
### Windows (PowerShell)
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
irm https://ps1.dcr-tool.ru | iex
|
& ([scriptblock]::Create((irm https://ps1.dcr-tool.ru))) self-install
|
||||||
# or download then run:
|
|
||||||
# irm https://ps1.dcr-tool.ru -OutFile dcrup.ps1
|
|
||||||
# powershell -File .\dcrup.ps1 self-install
|
|
||||||
# $env:Path += ";$env:USERPROFILE\.dcr\bin"
|
# $env:Path += ";$env:USERPROFILE\.dcr\bin"
|
||||||
dcrup install stable
|
dcrup install stable
|
||||||
```
|
```
|
||||||
|
|
||||||
Optional cmd bootstrap (if you prefer `curl` of the cmd shim):
|
After `self-install`, the command is **`dcrup`** (no `.sh` / `.ps1`) and is installed in `~/.dcr/bin` (Unix) or `%USERPROFILE%\.dcr\bin` (Windows).
|
||||||
|
|
||||||
```bat
|
|
||||||
curl -fsSL -o dcrup.cmd https://cmd.dcr-tool.ru
|
|
||||||
```
|
|
||||||
|
|
||||||
After `self-install`, the command is **`dcrup`** (no `.sh` / `.ps1`): shims live in `~/.dcr/bin` (Unix) or `%USERPROFILE%\.dcr\bin` (Windows `dcrup.cmd`).
|
|
||||||
|
|
||||||
### Common dcrup commands
|
### Common dcrup commands
|
||||||
|
|
||||||
@@ -58,6 +49,8 @@ dcrup update
|
|||||||
dcrup list
|
dcrup list
|
||||||
dcrup show
|
dcrup show
|
||||||
dcrup which
|
dcrup which
|
||||||
|
dcrup uninstall 0.8.2 # remove one installed version
|
||||||
|
dcrup uninstall --all # remove all installed versions
|
||||||
```
|
```
|
||||||
|
|
||||||
Layout: `~/.dcr/toolchains/\<id>/dcr` and `~/.dcr/bin/dcr` → active version.
|
Layout: `~/.dcr/toolchains/\<id>/dcr` and `~/.dcr/bin/dcr` → active version.
|
||||||
|
|||||||
34
docs-crowdin-export/ru-RU/docs/reference/cli-output.mdx.mdx
Normal file
34
docs-crowdin-export/ru-RU/docs/reference/cli-output.mdx.mdx
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
sidebar_label: CLI output
|
||||||
|
---
|
||||||
|
|
||||||
|
# CLI output (experimental)
|
||||||
|
|
||||||
|
The structured output implementation is being developed incrementally.
|
||||||
|
Currently these global options apply to diagnostics emitted through the logger:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
dcr --output plain build
|
||||||
|
dcr --output json build
|
||||||
|
dcr --color never build
|
||||||
|
dcr --quiet build
|
||||||
|
dcr --verbose build
|
||||||
|
```
|
||||||
|
|
||||||
|
`--output` accepts `human` (default), `plain`, or `json`.
|
||||||
|
Diagnostics are written to stderr. JSON diagnostics are newline-delimited objects
|
||||||
|
with `schema_version: 1`, `event`, and `message` fields. Command statuses use the
|
||||||
|
shared output helpers, build reporting emits structured lifecycle events, and
|
||||||
|
compiler output is represented as JSON events with its original stream and text.
|
||||||
|
The protocol is still experimental: some raw command data and subprocess stdout
|
||||||
|
remain unstructured.
|
||||||
|
|
||||||
|
`--color` accepts `auto`, `always`, or `never`. Automatic coloring requires a
|
||||||
|
terminal and respects `NO_COLOR`. Plain and JSON diagnostics never add colors.
|
||||||
|
Quiet mode preserves warnings, errors, and compiler diagnostics; verbose mode
|
||||||
|
enables debug and trace logging. Arguments following `--` are passed through
|
||||||
|
unchanged.
|
||||||
|
|
||||||
|
Remaining work includes migrating the remaining raw command data and subprocess
|
||||||
|
stdout, improving progress rendering and contextual errors, and expanding
|
||||||
|
integration coverage for stdout/stderr and closed pipes.
|
||||||
@@ -112,7 +112,12 @@ Never fails the command — warnings only. Pre-release suffixes (`1.0.0-dev`) ar
|
|||||||
|
|
||||||
Параметры из исходного файла конфигурации (не в виде типизированной структуры):
|
Параметры из исходного файла конфигурации (не в виде типизированной структуры):
|
||||||
|
|
||||||
* Пакеты для pkg-config
|
* `pkg_config` — list of packages queried for build-wide compiler/linker flags
|
||||||
|
|
||||||
|
Dependencies can also declare a system package directly, for example
|
||||||
|
`fmt = { pkg-config = "fmt" }`. This records the package in `dcr.lock` and applies
|
||||||
|
the flags returned by `pkg-config --cflags` and `pkg-config --libs`.
|
||||||
|
|
||||||
* Путь к linker script
|
* Путь к linker script
|
||||||
* `build.steps` / `build.post_steps` — этапы генерации кода
|
* `build.steps` / `build.post_steps` — этапы генерации кода
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ sidebar_label: Зависимости
|
|||||||
|
|
||||||
## Форматы
|
## Форматы
|
||||||
|
|
||||||
В секции `[dependencies]` поддерживаются три формата:
|
The `[dependencies]` section supports registry, path, Git, and `pkg-config` dependencies:
|
||||||
|
|
||||||
### Строка (реестр)
|
### Строка (реестр)
|
||||||
|
|
||||||
@@ -44,6 +44,23 @@ names (`libs`):
|
|||||||
dcr-math = { path = "../deps/dcr-math", include = ["include"], lib = ["lib"], libs = ["dcr-math"] }
|
dcr-math = { path = "../deps/dcr-math", include = ["include"], lib = ["lib"], libs = ["dcr-math"] }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Table (`pkg-config`)
|
||||||
|
|
||||||
|
Use an installed `.pc` package when the library is provided by the operating system
|
||||||
|
or another system package manager. DCR invokes `pkg-config --cflags` and
|
||||||
|
`pkg-config --libs`, preserving include, library, linker, and other flags:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[dependencies]
|
||||||
|
fmt = { pkg-config = "fmt" }
|
||||||
|
openssl = { pkg-config = ["openssl", "libcrypto"] }
|
||||||
|
```
|
||||||
|
|
||||||
|
The `pkg-config` executable must be available in `PATH`. The named `.pc` files must
|
||||||
|
be available through pkg-config's standard search paths or via `PKG_CONFIG_PATH`.
|
||||||
|
These dependencies are not downloaded or built by DCR; they are recorded in
|
||||||
|
`dcr.lock` with a `pkg-config+...` source.
|
||||||
|
|
||||||
## Реестр
|
## Реестр
|
||||||
|
|
||||||
## RegistryDCR использует реестр пакетов для поиска зависимостей по имени.```toml
|
## RegistryDCR использует реестр пакетов для поиска зависимостей по имени.```toml
|
||||||
|
|||||||
@@ -4,6 +4,20 @@ sidebar_label: Changelog
|
|||||||
|
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.9.5 (2026-10-21)
|
||||||
|
|
||||||
|
* **Structured CLI output** — shared helpers now provide Cargo-like human, plain, and JSON output modes.
|
||||||
|
* **Color and diagnostics policy** — `--color`, `NO_COLOR`, `--quiet`, and `--verbose` are applied consistently across commands.
|
||||||
|
* **Build reporting** — lifecycle events and compiler diagnostics are available as structured JSON events.
|
||||||
|
* **Output lab** — sandbox scenarios cover help, lifecycle commands, compiler warnings/errors, stream capture, and broken pipes.
|
||||||
|
|
||||||
|
## 0.9.1 (2026-09-13)
|
||||||
|
|
||||||
|
* **`pkg-config` dependencies** — declare `fmt = { pkg-config = "fmt" }` or multiple package names in `[dependencies]`; DCR applies `.pc` compiler/linker flags and records the resolved package in `dcr.lock`.
|
||||||
|
* **`dcr add` support for `pkg-config`** — easily add system package dependencies with `dcr add fmt pkg-config:fmt` or `dcr add openssl pkg:openssl,libcrypto`.
|
||||||
|
* **`dcr tree` & IDE integration** — `pkg-config` packages are marked in `dcr tree` and resolved into compiler flags in `dcr gen` (`compile_commands.json`).
|
||||||
|
* **Fixed `dcr new` in non-ASCII / spaced paths** — initializing projects from folders with non-ASCII characters or spaces no longer fails validation.
|
||||||
|
|
||||||
## 0.9.0 (2026-08-31)
|
## 0.9.0 (2026-08-31)
|
||||||
|
|
||||||
* **Download mirrors in `dcrup`** — `--mirror auto|cf|gh|sf|ya` and `DCRUP_MIRROR`.
|
* **Download mirrors in `dcrup`** — `--mirror auto|cf|gh|sf|ya` and `DCRUP_MIRROR`.
|
||||||
|
|||||||
@@ -15,6 +15,8 @@ dcr add mylib path:./lib # explicit path prefix
|
|||||||
dcr add mylib git:https://github.com/user/repo # explicit git prefix
|
dcr add mylib git:https://github.com/user/repo # explicit git prefix
|
||||||
dcr add mylib github:user/repo # GitHub shorthand
|
dcr add mylib github:user/repo # GitHub shorthand
|
||||||
dcr add mylib gitlab:user/repo # GitLab shorthand
|
dcr add mylib gitlab:user/repo # GitLab shorthand
|
||||||
|
dcr add fmt pkg-config:fmt # system package via pkg-config
|
||||||
|
dcr add openssl pkg:openssl,libcrypto # multiple pkg-config packages
|
||||||
```
|
```
|
||||||
|
|
||||||
Source prefixes:
|
Source prefixes:
|
||||||
@@ -23,6 +25,7 @@ Source prefixes:
|
|||||||
* `git:` — generic git URL
|
* `git:` — generic git URL
|
||||||
* `github:` — expands to `https://github.com/\<user>/\<repo>`
|
* `github:` — expands to `https://github.com/\<user>/\<repo>`
|
||||||
* `gitlab:` — expands to `https://gitlab.com/\<user>/\<repo>`
|
* `gitlab:` — expands to `https://gitlab.com/\<user>/\<repo>`
|
||||||
|
* `pkg-config:` / `pkg:` — one or more packages resolved by `pkg-config`
|
||||||
* `http://` / `https://` / `git@` — full URL
|
* `http://` / `https://` / `git@` — full URL
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
@@ -33,6 +36,11 @@ Flags:
|
|||||||
|
|
||||||
If source is omitted — DCR searches connected registries. A bare relative or absolute path is accepted as a path dependency.
|
If source is omitted — DCR searches connected registries. A bare relative or absolute path is accepted as a path dependency.
|
||||||
|
|
||||||
|
For `pkg-config` dependencies, the referenced packages must already be installed
|
||||||
|
and provide `.pc` files. DCR invokes `pkg-config` during the build (using
|
||||||
|
`PATH` and `PKG_CONFIG_PATH`) and forwards the returned compiler and linker
|
||||||
|
flags; it does not download or build these packages.
|
||||||
|
|
||||||
## `dcr tree`
|
## `dcr tree`
|
||||||
|
|
||||||
Displays the project dependency tree.
|
Displays the project dependency tree.
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ Install and switch DCR versions (stable / dev / night, pin `0.8.2`, optional bui
|
|||||||
### Linux / macOS / BSD / Windows (bash)
|
### Linux / macOS / BSD / Windows (bash)
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -fsSL https://sh.dcr-tool.ru | sh -s -- self-install
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.dcr-tool.ru | sh -s -- self-install
|
||||||
export PATH="$HOME/.dcr/bin:$PATH"
|
export PATH="$HOME/.dcr/bin:$PATH"
|
||||||
dcrup install stable
|
dcrup install stable
|
||||||
```
|
```
|
||||||
@@ -19,28 +19,19 @@ dcrup install stable
|
|||||||
Non-interactive install of DCR in one shot:
|
Non-interactive install of DCR in one shot:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
curl -fsSL https://sh.dcr-tool.ru | sh -s -- install stable
|
curl --proto '=https' --tlsv1.2 -sSf https://sh.dcr-tool.ru | sh -s -- install stable
|
||||||
export PATH="$HOME/.dcr/bin:$PATH"
|
export PATH="$HOME/.dcr/bin:$PATH"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Windows (PowerShell)
|
### Windows (PowerShell)
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
irm https://ps1.dcr-tool.ru | iex
|
& ([scriptblock]::Create((irm https://ps1.dcr-tool.ru))) self-install
|
||||||
# or download then run:
|
|
||||||
# irm https://ps1.dcr-tool.ru -OutFile dcrup.ps1
|
|
||||||
# powershell -File .\dcrup.ps1 self-install
|
|
||||||
# $env:Path += ";$env:USERPROFILE\.dcr\bin"
|
# $env:Path += ";$env:USERPROFILE\.dcr\bin"
|
||||||
dcrup install stable
|
dcrup install stable
|
||||||
```
|
```
|
||||||
|
|
||||||
Optional cmd bootstrap (if you prefer `curl` of the cmd shim):
|
After `self-install`, the command is **`dcrup`** (no `.sh` / `.ps1`) and is installed in `~/.dcr/bin` (Unix) or `%USERPROFILE%\.dcr\bin` (Windows).
|
||||||
|
|
||||||
```bat
|
|
||||||
curl -fsSL -o dcrup.cmd https://cmd.dcr-tool.ru
|
|
||||||
```
|
|
||||||
|
|
||||||
After `self-install`, the command is **`dcrup`** (no `.sh` / `.ps1`): shims live in `~/.dcr/bin` (Unix) or `%USERPROFILE%\.dcr\bin` (Windows `dcrup.cmd`).
|
|
||||||
|
|
||||||
### Common dcrup commands
|
### Common dcrup commands
|
||||||
|
|
||||||
@@ -58,6 +49,8 @@ dcrup update
|
|||||||
dcrup list
|
dcrup list
|
||||||
dcrup show
|
dcrup show
|
||||||
dcrup which
|
dcrup which
|
||||||
|
dcrup uninstall 0.8.2 # remove one installed version
|
||||||
|
dcrup uninstall --all # remove all installed versions
|
||||||
```
|
```
|
||||||
|
|
||||||
Layout: `~/.dcr/toolchains/\<id>/dcr` and `~/.dcr/bin/dcr` → active version.
|
Layout: `~/.dcr/toolchains/\<id>/dcr` and `~/.dcr/bin/dcr` → active version.
|
||||||
|
|||||||
34
docs-crowdin-export/uk-UA/docs/reference/cli-output.mdx.mdx
Normal file
34
docs-crowdin-export/uk-UA/docs/reference/cli-output.mdx.mdx
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
---
|
||||||
|
sidebar_label: CLI output
|
||||||
|
---
|
||||||
|
|
||||||
|
# CLI output (experimental)
|
||||||
|
|
||||||
|
The structured output implementation is being developed incrementally.
|
||||||
|
Currently these global options apply to diagnostics emitted through the logger:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
dcr --output plain build
|
||||||
|
dcr --output json build
|
||||||
|
dcr --color never build
|
||||||
|
dcr --quiet build
|
||||||
|
dcr --verbose build
|
||||||
|
```
|
||||||
|
|
||||||
|
`--output` accepts `human` (default), `plain`, or `json`.
|
||||||
|
Diagnostics are written to stderr. JSON diagnostics are newline-delimited objects
|
||||||
|
with `schema_version: 1`, `event`, and `message` fields. Command statuses use the
|
||||||
|
shared output helpers, build reporting emits structured lifecycle events, and
|
||||||
|
compiler output is represented as JSON events with its original stream and text.
|
||||||
|
The protocol is still experimental: some raw command data and subprocess stdout
|
||||||
|
remain unstructured.
|
||||||
|
|
||||||
|
`--color` accepts `auto`, `always`, or `never`. Automatic coloring requires a
|
||||||
|
terminal and respects `NO_COLOR`. Plain and JSON diagnostics never add colors.
|
||||||
|
Quiet mode preserves warnings, errors, and compiler diagnostics; verbose mode
|
||||||
|
enables debug and trace logging. Arguments following `--` are passed through
|
||||||
|
unchanged.
|
||||||
|
|
||||||
|
Remaining work includes migrating the remaining raw command data and subprocess
|
||||||
|
stdout, improving progress rendering and contextual errors, and expanding
|
||||||
|
integration coverage for stdout/stderr and closed pipes.
|
||||||
@@ -112,7 +112,12 @@ Never fails the command — warnings only. Pre-release suffixes (`1.0.0-dev`) ar
|
|||||||
|
|
||||||
Settings from raw config (not in typed struct):
|
Settings from raw config (not in typed struct):
|
||||||
|
|
||||||
* `pkg_config` — list of pkg-config packages
|
* `pkg_config` — list of packages queried for build-wide compiler/linker flags
|
||||||
|
|
||||||
|
Dependencies can also declare a system package directly, for example
|
||||||
|
`fmt = { pkg-config = "fmt" }`. This records the package in `dcr.lock` and applies
|
||||||
|
the flags returned by `pkg-config --cflags` and `pkg-config --libs`.
|
||||||
|
|
||||||
* `ldscript` — linker script path
|
* `ldscript` — linker script path
|
||||||
* `build.steps` / `build.post_steps` — codegen steps
|
* `build.steps` / `build.post_steps` — codegen steps
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ sidebar_label: Dependencies
|
|||||||
|
|
||||||
## Formats
|
## Formats
|
||||||
|
|
||||||
The `[dependencies]` section supports three formats:
|
The `[dependencies]` section supports registry, path, Git, and `pkg-config` dependencies:
|
||||||
|
|
||||||
### String (registry)
|
### String (registry)
|
||||||
|
|
||||||
@@ -44,6 +44,23 @@ names (`libs`):
|
|||||||
dcr-math = { path = "../deps/dcr-math", include = ["include"], lib = ["lib"], libs = ["dcr-math"] }
|
dcr-math = { path = "../deps/dcr-math", include = ["include"], lib = ["lib"], libs = ["dcr-math"] }
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Table (`pkg-config`)
|
||||||
|
|
||||||
|
Use an installed `.pc` package when the library is provided by the operating system
|
||||||
|
or another system package manager. DCR invokes `pkg-config --cflags` and
|
||||||
|
`pkg-config --libs`, preserving include, library, linker, and other flags:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[dependencies]
|
||||||
|
fmt = { pkg-config = "fmt" }
|
||||||
|
openssl = { pkg-config = ["openssl", "libcrypto"] }
|
||||||
|
```
|
||||||
|
|
||||||
|
The `pkg-config` executable must be available in `PATH`. The named `.pc` files must
|
||||||
|
be available through pkg-config's standard search paths or via `PKG_CONFIG_PATH`.
|
||||||
|
These dependencies are not downloaded or built by DCR; they are recorded in
|
||||||
|
`dcr.lock` with a `pkg-config+...` source.
|
||||||
|
|
||||||
## Registry
|
## Registry
|
||||||
|
|
||||||
DCR uses a package registry for dependency lookup by name.
|
DCR uses a package registry for dependency lookup by name.
|
||||||
|
|||||||
Reference in New Issue
Block a user