This document describes the dust CLI for the Dust Programming Language (DPL) toolchain.
DPL source files use the default extension: .ds.
Parse and validate .ds input(s) (no code generation).
dust check <path>- If
<path>is a file: it MUST be a.dsfile. - If
<path>is a directory: all.dsfiles under it are checked.
dust check examples/
dust check examples/K/k_hello_world.dsEmit canonical DIR (Dust Intermediate Representation) for .ds input(s).
dust dir <path> --out <dir> [--print]- Writes one
*.dir.jsonper input module to the output directory. --printalso prints the JSON to stdout.
dust dir examples/ --out target/dir
dust dir examples/K/k_hello_world.ds --out target/dir --printBuild a native executable from a .ds program.
dust build <path> [--out <exe-path>]<path>may be:- a single
.dsfile, or - a directory containing exactly one
.dsfile (v0.1 behavior)
- a single
--outsets the output executable path.- If omitted, the default is:
target/dust/<stem>(and.exeis added on Windows if missing)
- If omitted, the default is:
The v0.1 compiler currently produces native executables for a constrained, spec-aligned subset:
- Entry point:
K main { ... } - Supported statements in
main:- ordered
emit "<string>"effects
- ordered
- Q-regime and Φ-regime are not codegen-enabled yet.
If your program uses unsupported constructs, dust build MUST fail deterministically with an explanatory error.
dust build examples/K/k_hello_world.ds
./target/dust/k_hello_worlddust build examples/K/k_multiple_emits.ds --out target/dust/my_program
./target/dust/my_programBuild then run a .ds program.
dust run <path> -- <args...>- Builds the program using the same rules as
dust build. - Any arguments after
--are passed to the produced executable.
dust run examples/K/k_hello_world.dsdust run examples/K/k_hello_world.ds -- --helpCompile multiple DPL modules to relocatable objects and link a bare-metal kernel image.
dust kernel-link <input> [<input> ...] [options]Where each <input> is a .ds file or a directory.
--out <path>: output kernel binary (default:target/dust/kernel.bin)--obj-dir <path>: intermediate object directory--entry <name>: K entry proc name (default:main)--start-symbol <name>: linked start symbol (default:_dust_kernel_start)--target <triple>: object target triple (default:x86_64-pc-none-elf)--linker <cmd>: external linker command (default:ld.lld)--skip-tests <bool>: skip*_tests.dsmodules (default:true)
dust kernel-link xdv-kernel/sector/xdv_kernel/src \
xdv-runtime/src \
xdv-xdvfs/src \
--entry main \
--out target/dust/xdv-kernel.binDefault build outputs:
- Executables:
target/dust/<stem>(ortarget/dust/<stem>.exeon Windows) - DIR (if emitted):
target/dir/*.dir.json
dustis the toolchain entrypoint and the authoritative compiler for DPL.- The specification is normative and lives in
spec/. - Reference examples live in
examples/.