Build, run, and test
Build and run use ahead-of-time compilation. run creates a temporary executable and starts it. build preserves the requested output.
Prerequisites
Section titled “Prerequisites”Start with source that passes beskid analyze. To run test items, select a project with a valid .bproj manifest and a Test or Lib target.
Actions
Section titled “Actions”-
Analyze one source file:
Terminal window beskid analyze Main.bd --plain -
Build a debug executable:
Terminal window beskid build Main.bd --kind exe --plain -
Build an optimized executable when you need a release artifact:
Terminal window beskid build Main.bd --kind exe --release --plain -
Execute the same entrypoint in an AOT-compiled subprocess:
Terminal window beskid run Main.bd --entrypoint Main --plain -
Run test items for a selected project target:
Terminal window beskid test --project App.bproj --target AppTests --plain -
Select tests with
--include-tag,--exclude-tag,--group, or--all-targets. The last option runs every Test target in one project process.
Expected result
Section titled “Expected result”The build command prints the object path and final output path. The run command returns the subprocess status. The test command reports passed, failed, skipped, and filtered items; it fails when a selected test fails.
Recovery
Section titled “Recovery”Treat the first error as the active failure. Fix analysis errors before code generation. A target-selection error requires a valid .bproj target name. A runtime-kit error requires a kit whose target and debug or release profile match the build. Do not select both --prefer-static and --prefer-dynamic.
Next task
Section titled “Next task”Run the same gates in CI or read Projects before you add targets and dependencies.