mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-22 03:39:36 +00:00
fix: add missing .cxx/.cc/.hxx/.hh extensions to fmt; update docs for 0.7.0
This commit is contained in:
@@ -13,6 +13,8 @@ dcr clean [--debug|--release] [--all]
|
||||
dcr tree
|
||||
dcr test
|
||||
dcr gen <subcommand>
|
||||
dcr fmt
|
||||
dcr setup
|
||||
dcr --help
|
||||
dcr --version
|
||||
dcr --update
|
||||
@@ -20,11 +22,13 @@ dcr --update
|
||||
|
||||
## Notes on argument parsing
|
||||
|
||||
- `build`/`run` parse flags in any order (`--debug|--release`, `--force`, `--clean`, `--verbose`) and reject duplicates.
|
||||
- `build`/`run` parse flags in any order (`--debug|--release`, `--force`, `--clean`, `--verbose`, `--workspace`) and reject duplicates.
|
||||
- `new` requires exactly one argument.
|
||||
- `init` and `--update` do not accept extra arguments.
|
||||
- `clean` accepts `--debug|--release` and optional `--all`.
|
||||
- `gen` supports `project-info`, `compile-commands`, `vscode`, `clion`.
|
||||
- `fmt` formats C/C++ sources (`.c`, `.cpp`, `.cxx`, `.cc`, `.h`, `.hpp`, `.hxx`, `.hh`) in `src/` and `tests/` using `clang-format`.
|
||||
- `setup` initializes DCR registries and local configuration.
|
||||
- `tree` shows a dependency tree (similar to `cargo tree`).
|
||||
- `test` / `tests` runs the project's tests.
|
||||
|
||||
|
||||
@@ -19,13 +19,14 @@ categories = ["string", "..."] # optional
|
||||
|
||||
[build]
|
||||
language = "c|c++|cpp|cxx|asm" # required (string or array)
|
||||
standard = "string" # required (e.g. "c11", "gnu11")
|
||||
standard = "string" # optional (default "c11")
|
||||
cxx_standard = "string" # optional (e.g. "c++17", "gnu++17")
|
||||
compiler = "string" # required (e.g. "clang", "gcc")
|
||||
kind = "bin|staticlib|sharedlib|efi|elf" # required
|
||||
kind = "bin|staticlib|sharedlib|efi|elf|none|custom" # optional (default "bin")
|
||||
target = "string" # optional (cross-compilation target triple)
|
||||
out_dir = "string" # optional (custom output directory)
|
||||
platform = "string" # optional (architecture hint, -march)
|
||||
type = "string" # optional
|
||||
|
||||
cflags = ["string", "..."] # optional (supports {version} etc.)
|
||||
ldflags = ["string", "..."] # optional (supports {version} etc.)
|
||||
ldscript = "string" # optional (linker script path)
|
||||
@@ -121,14 +122,15 @@ rev = "string" # optional (git commit)
|
||||
include = ["string", "..."] # optional (include dirs)
|
||||
lib = ["string", "..."] # optional (lib dirs)
|
||||
libs = ["string", "..."] # optional (link libs)
|
||||
features = ["string", "..."] # optional (registry features)
|
||||
features = ["string", "..."] # optional (registry features)
|
||||
default-features = true # optional (include default features)
|
||||
```
|
||||
|
||||
## Validation rules
|
||||
|
||||
- `[package]`, `[build]`, `[dependencies]` must exist.
|
||||
- Required string fields must be non-empty.
|
||||
- `build.kind` must be `bin`, `staticlib`, `sharedlib`, `efi`, or `elf`.
|
||||
- `build.kind` must be `bin`, `staticlib`, `sharedlib`, `efi`, `elf`, `none`, or `custom`.
|
||||
- Dependency fields `include/lib/libs` must be string arrays when provided.
|
||||
- `build.exclude`/`build.include` must be string arrays when provided.
|
||||
- `build.roots` must be a string array when provided.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
## What commands are available?
|
||||
|
||||
`new`, `init`, `build`, `run`, `clean`, `gen`, `--help`, `--version`, `--update`.
|
||||
`new`, `init`, `add`, `build`, `run`, `clean`, `test`, `fmt`, `tree`, `gen`, `setup`, `--help`, `--version`, `--update`.
|
||||
|
||||
## Is `dcr.toml` mandatory?
|
||||
|
||||
|
||||
@@ -8,8 +8,11 @@ Used with `dcr build` and `dcr run`:
|
||||
|
||||
- `--debug`: select debug profile.
|
||||
- `--release`: select release profile.
|
||||
- `--target <triple>`: build for specified target (short names: `linux`, `macos`, `windows`, `freebsd`, `openbsd`, `netbsd`).
|
||||
- `--force`: ignore incremental cache checks and rebuild.
|
||||
- `--clean`: remove `target/<profile>` and `build.clean` paths before build.
|
||||
- `--verbose`: print compiler/linker command lines to stderr.
|
||||
- `--workspace <name>`: filter build to a specific workspace member.
|
||||
|
||||
Notes:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user