Files
dcr/docs/getting-started/build-and-run.md
Dexoron 5f0dca4bb3 Added:
- `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
2026-03-19 00:02:04 +08:00

799 B

Build and run

Build

Debug (default):

dcr build
# or
dcr build --debug
dcr build --debug --clean

Release:

dcr build --release

Run

dcr run
# or
dcr run --release
dcr run --release --force

dcr run first builds, then launches the produced binary.

Clean artifacts

dcr clean

Profile-only cleanup:

dcr clean --debug
dcr clean --release
dcr clean --all
dcr clean --release --all

Notes

  • run is unavailable for build.kind = "staticlib" and build.kind = "sharedlib".
  • Build profile flag is parsed from the first command argument.
  • Unknown profile flags produce an error.
  • In workspace root, clean --all cleans all member projects.
  • --clean for build/run removes target/<profile> and paths from build.clean.