Start with INSTALL.md for the source installation, LLVM tools, PATH setup and first program.
Save the npkbuild helper from its first-program section.
For hello.npk, use:
npkbuild hello
./helloRead these guides in order:
- Quick start: a first program, bindings, functions and
Result, errors andfailsafe, control flow, structs, and a library import. - Cheat sheet: short examples of calls, operators, types and literals.
- Driver guide: the SDK header, C build setup, library paths, and a Nitpick client with a C driver.
The guides and examples come from the public documentation repository, on branch main, with the guides at its top level.
Clone it beside the compiler clone, so that nitpick/ and nitpick-docs/ share a parent folder.
For the hello example, work in examples/01_hello/: run npkbuild hello, then ./hello.
See the driver guide for examples/02_driver/ and its build commands.
See contracts for requires, ensures, and the checks Z3 can prove.
See limits for rules on locals, parameters and struct fields.
For further reading in the clone, see the reference files in meta/specs/.
Editor highlighting for VS Code, nano, vim and Emacs is in nitpick-tools.
The guides were checked against compiler commit 64861f8, and again at 226ebb99 (the quick start, the cheat sheet, and the driver guide's caution note and example). Each example page names the commit it was checked against.