DEVELOPMENT EDITION · 769442725406
Toolchain Manual
On this page

veradic build

Prove and compile the selected program into a native executable; do not execute it.

veradic [GLOBAL OPTIONS] build [COMPILE OPTIONS] [-o FILE] [FILES...]

A program needs one unambiguous library-level parameterless procedure as main. Inputs/project selection and dependency loading follow projects. All language, lowering and flow checks precede default strict proof. Code generation produces host-native objects and links them with embedded runtime objects and configured project C sources.

veradic build --project docs/manuals/examples/first-proof/vada/after/verada.toml -o application
./application
veradic build -g --project verada.toml -o application-debug

Options and dependencies

All shared compile options are accepted. -o/--output names the executable; by default the lowercased final main-name component is used (fallback a.out when no main name is available). Choose an explicit output for automation and make its parent directory writable; the compiler does not provide an install-directory command or create arbitrary missing output parents.

Proof controls and --show-flow/--dump-bir behave as described in options. --cc selects the compiler driver over VERADA_CC and cc. -g/--debug disables native optimization, emits debug information and on macOS invokes dsymutil for a sibling .dSYM. The normal LLVM path uses O2. --emit is accepted but does not change build into emit.

Default mode blocks code generation on failed/unknown proof. --advisory permits proof warnings and keeps unproved checks at run time, plus ghost code. --no-prove skips proof and keeps every check at run time, except a contract that needs erased ghost code (B8007). --proof cached asks no solver: checks the project's proof cache already proved are left out, every other check is kept at run time, and warning B8012 counts them; --proof full (the default for build) proves first. See mode semantics before using any of these. No flag relaxes legality/flow failures.

A runnable compiler needs its LLVM/Haskell shared libraries. Proof needs available solver work unless all obligations discharge otherwise. Linking needs selected C compiler and platform runtime facilities. The executable's external dynamic dependencies are a delivery obligation.

Output, exit status and artifacts

Success exits 0 and prints the proof summary (when attempted) plus built FILE. Human errors/warnings use stderr; JSON places a diagnostic array on stdout but the built message still follows it. Do not parse the whole success stdout as one JSON document. Failures normally exit 1. An earlier executable can remain after a failed attempt; never run it merely because the path exists. Linking errors report B7008, write problems can report B7009, and backend rejection reports B9001.

Project objects are cached in .verada/obj; nonproject objects, runtime and C objects use the XDG-selected cache. Proof, interfaces and certificates have separate lifecycles. The executable and .dSYM are user outputs; sources are not rewritten. --no-cache does not force a fresh native/C compile. Use clean builds when changing the C compiler or investigating stale headers. Read debugging for native failures.

A check kept at run time is checked as the program runs; leak freedom and termination are proved, not checked at run time. See mode limits.