mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 18:39:42 +00:00
Compare commits
16 Commits
80c87539f5
...
000ad89798
| Author | SHA1 | Date | |
|---|---|---|---|
| 000ad89798 | |||
| 2c7ca13775 | |||
| 8fd2dd00d2 | |||
| 8c3fbf4d80 | |||
| cd566872db | |||
| 864cd0565e | |||
| 706131ea57 | |||
| 0b461ac906 | |||
| 2a777d1124 | |||
| 3200d7f719 | |||
| 543099e934 | |||
| 07e8776bf8 | |||
| e516f17704 | |||
| 2bc37d5960 | |||
| ddd06b4b06 | |||
| 46356739e9 |
@@ -4,6 +4,13 @@ sidebar_label: Changelog
|
||||
|
||||
# Changelog
|
||||
|
||||
## 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)
|
||||
|
||||
* **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 github:user/repo # GitHub 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:
|
||||
@@ -23,6 +25,7 @@ Source prefixes:
|
||||
* `git:` — generic git URL
|
||||
* `github:` — expands to `https://github.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
|
||||
|
||||
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.
|
||||
|
||||
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`
|
||||
|
||||
Displays the project dependency tree.
|
||||
|
||||
@@ -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):
|
||||
|
||||
* `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
|
||||
* `build.steps` / `build.post_steps` — codegen steps
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ sidebar_label: Dependencies
|
||||
|
||||
## Formats
|
||||
|
||||
The `[dependencies]` section supports three formats:
|
||||
The `[dependencies]` section supports registry, path, Git, and `pkg-config` dependencies:
|
||||
|
||||
### String (registry)
|
||||
|
||||
@@ -44,6 +44,23 @@ names (`libs`):
|
||||
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
|
||||
|
||||
DCR uses a package registry for dependency lookup by name.
|
||||
|
||||
@@ -4,6 +4,13 @@ sidebar_label: Changelog
|
||||
|
||||
# Changelog
|
||||
|
||||
## 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)
|
||||
|
||||
* **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 github:user/repo # GitHub 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:
|
||||
@@ -23,6 +25,7 @@ Source prefixes:
|
||||
* `git:` — generic git URL
|
||||
* `github:` — expands to `https://github.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
|
||||
|
||||
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.
|
||||
|
||||
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`
|
||||
|
||||
Displays the project dependency tree.
|
||||
|
||||
@@ -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):
|
||||
|
||||
* `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
|
||||
* `build.steps` / `build.post_steps` — codegen steps
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ sidebar_label: Dependencies
|
||||
|
||||
## Formats
|
||||
|
||||
The `[dependencies]` section supports three formats:
|
||||
The `[dependencies]` section supports registry, path, Git, and `pkg-config` dependencies:
|
||||
|
||||
### String (registry)
|
||||
|
||||
@@ -44,6 +44,23 @@ names (`libs`):
|
||||
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
|
||||
|
||||
DCR uses a package registry for dependency lookup by name.
|
||||
|
||||
@@ -4,6 +4,13 @@ sidebar_label: Список изменений
|
||||
|
||||
# Список изменений
|
||||
|
||||
## 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)
|
||||
|
||||
* **Download mirrors in `dcrup`** — `--mirror auto|cf|gh|sf|ya` and `DCRUP_MIRROR`.
|
||||
|
||||
@@ -9,12 +9,14 @@ sidebar_label: Команды зависимостей (add, tree)
|
||||
Добавляет зависимость в `dcr.toml`.
|
||||
|
||||
```bash
|
||||
dcr add fmt # поиск в реестре
|
||||
dcr add mylib ../path/to/lib # путь как источник
|
||||
dcr add mylib path:./lib # явный префикс пути
|
||||
dcr add mylib git:https://github.com/user/repo # явный префикс git
|
||||
dcr add mylib github:user/repo # сокращённая запись GitHub
|
||||
dcr add mylib gitlab:user/repo # сокращённая запись GitLab
|
||||
dcr add fmt # registry lookup
|
||||
dcr add mylib ../path/to/lib # path as source
|
||||
dcr add mylib path:./lib # explicit path prefix
|
||||
dcr add mylib git:https://github.com/user/repo # explicit git prefix
|
||||
dcr add mylib github:user/repo # GitHub 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
|
||||
```
|
||||
|
||||
Префиксы источника:
|
||||
@@ -23,6 +25,7 @@ dcr add mylib gitlab:user/repo # сокращённая запись GitLab
|
||||
* `git:` — URL адрес git-репозитория
|
||||
* `github:` — расширение `https://github.com/\<user>/\<repo>`
|
||||
* `gitlab:` — расширение `https://gitlab.com/\<user>/\<repo>`
|
||||
* `pkg-config:` / `pkg:` — one or more packages resolved by `pkg-config`
|
||||
* `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.
|
||||
|
||||
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`
|
||||
|
||||
Показывает дерево зависимостей проекта.
|
||||
|
||||
@@ -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
|
||||
* `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"] }
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
@@ -4,6 +4,13 @@ sidebar_label: Changelog
|
||||
|
||||
# Changelog
|
||||
|
||||
## 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)
|
||||
|
||||
* **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 github:user/repo # GitHub 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:
|
||||
@@ -23,6 +25,7 @@ Source prefixes:
|
||||
* `git:` — generic git URL
|
||||
* `github:` — expands to `https://github.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
|
||||
|
||||
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.
|
||||
|
||||
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`
|
||||
|
||||
Displays the project dependency tree.
|
||||
|
||||
@@ -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):
|
||||
|
||||
* `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
|
||||
* `build.steps` / `build.post_steps` — codegen steps
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ sidebar_label: Dependencies
|
||||
|
||||
## Formats
|
||||
|
||||
The `[dependencies]` section supports three formats:
|
||||
The `[dependencies]` section supports registry, path, Git, and `pkg-config` dependencies:
|
||||
|
||||
### String (registry)
|
||||
|
||||
@@ -44,6 +44,23 @@ names (`libs`):
|
||||
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
|
||||
|
||||
DCR uses a package registry for dependency lookup by name.
|
||||
|
||||
Reference in New Issue
Block a user