mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 14:08:30 +00:00
- `dcr gen` command for IDE integration and build tool support
- `dcr gen project-info`: Output project metadata as JSON
- `dcr gen compile-commands`: Generate `compile_commands.json` for clangd and clang-tidy
- `dcr gen vscode`: Generate VS Code `.vscode/` integration (launch.json, tasks.json, settings.json)
- `dcr gen clion`: Generate JetBrains CLion `.idea/` integration (run configurations, build targets)
- Full workspace support for all `gen` subcommands
64 lines
1.1 KiB
Markdown
64 lines
1.1 KiB
Markdown
# dcr.toml overview
|
|
|
|
`dcr.toml` is the main project file used by DCR.
|
|
|
|
## Minimal generated template
|
|
|
|
```toml
|
|
[package]
|
|
name = "hello"
|
|
version = "0.1.0"
|
|
|
|
[build]
|
|
language = "c"
|
|
standard = "c11"
|
|
compiler = "clang"
|
|
kind = "bin"
|
|
|
|
[dependencies]
|
|
```
|
|
|
|
`dcr new` and `dcr init` generate this structure automatically.
|
|
|
|
## Required sections
|
|
|
|
- `[package]`
|
|
- `[build]`
|
|
- `[dependencies]`
|
|
|
|
Workspace-only root:
|
|
- `[workspace]` may be used instead of `[package]`/`[build]` for a workspace root.
|
|
|
|
## Required keys
|
|
|
|
- `package.name`
|
|
- `package.version`
|
|
- `build.language`
|
|
- `build.standard`
|
|
- `build.compiler`
|
|
- `build.kind`
|
|
|
|
`build.kind` must be either `bin`, `staticlib`, or `sharedlib`.
|
|
|
|
## Optional keys
|
|
|
|
- `build.target`
|
|
- `build.cflags`
|
|
- `build.ldflags`
|
|
- `build.exclude`
|
|
- `build.include`
|
|
- `build.roots`
|
|
- `build.src_disable`
|
|
- `build.pkg_config`
|
|
- `build.steps`
|
|
- `build.post_steps`
|
|
- `build.generated`
|
|
- `build.expect`
|
|
- `build.clean`
|
|
- `build.debug`
|
|
- `build.release`
|
|
- dependency fields (`include`, `lib`, `libs`, `system`)
|
|
- `[toolchain]` overrides (`cc`, `cxx`, `as`, `ar`, `ld`, `uic`, `moc`, `rcc`)
|
|
- `[workspace]` members
|
|
- `[run]` overrides (`cmd`)
|