Skip to content
Adam
Build and run

The adam command

One program builds, checks, runs, debugs, imports and serves your code.

Commands

adam build <file> builds the program whose main module is <file>; adam build <folder> builds the project whose project.toml is in <folder> (the current folder when none is given, Projects). adam check <file> runs the front end only and builds nothing. adam init, adam pack and adam info make, pack and describe a project, and adam deps add | remove | list edits its dependencies (Dependencies); adam cimport <spec> turns C headers into an Adam binding unit (adam cimport). adam lsp and adam dap serve the Language Server and Debug Adapter Protocols on stdin / stdout for an editor (The language server, In an editor), and adam editor starts the Adam The Adam editor. adam bench times Adam's benchmark kernels beside their C twins and writes a report (The benchmark suite).

Every command and option, as adam's own help lists them: Commands.

Running and debugging

-r runs the exe once it is built, in its folder. With -t x86_64-linux-gnu on Windows the program runs through WSL (Targets). The arguments after -- are the program's own, for the program -r or -d runs.

-d builds the program, then runs it under adam's console debugger (At the prompt). It needs a debug build, and adam has a debugger only for its host's programs where it has one (x86_64-windows-gnu today).

Choosing what is built

-t <triple> picks the target and wins over the main module's @target. -opt <level> picks the optimization level (debug, safe, fast or small) and wins over the main module's @optimize (Building). The exe goes into the bin folder of the output folder: -o <dir>, else the main module's @outputpath, else its project's output folder, else output under the working folder.

Help

adam help lists the commands, the options and the targets; adam help <command> (or -h after a command) shows one command's options and examples. A command line adam does not understand (an unknown command or option, a missing value, an option given twice) is reported with the help to read, and adam builds nothing.

↑ ↓ moveEnter openEsc close