mirror of
https://github.com/dexoron/dcr.git
synced 2026-10-21 09:18:29 +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
1.1 KiB
1.1 KiB
dcr run
Builds the project and runs the resulting binary.
Usage
dcr run
dcr run --debug
dcr run --release
dcr run --release --force
dcr run --debug --clean
Behavior
- Validates
dcr.toml. - Reads
package.name,build.kind, and optionalbuild.target. - Runs the same build flow as
dcr build. - Executes the built artifact path for the selected profile.
- If
[run].cmdis set, runs that command instead of the built binary.
Restrictions
- If
build.kind = "staticlib"orbuild.kind = "sharedlib",runexits with error. - The profile is selected from the first argument.
--forceskips build cache checks and recompiles.--cleanremovestarget/<profile>andbuild.cleanpaths before building.
run.cmd variables
run.cmd supports the same variables as build steps: {profile}, {version}, {version_major},
{version_minor}, {version_patch}, {version_suffix}, {version_suffix_dash}.
The command runs via sh -c on Unix and cmd /C on Windows.
On build failure
dcr run attempts to launch an existing binary from the same profile if present; otherwise it reports that code errors must be fixed.