Tutorial
Five short lessons that take you from Hello, world! to a
self-healing live block whose contracts are discharged by
Z3. Each one builds on the last. Every code snippet in every
lesson is verified by docs/verify_tutorial_snippets.sh — if
a snippet stops working, CI notices.
What you’ll build
- Hello, Resilient — install the compiler, run your first program, peek at the three execution backends.
- Variables and types —
let, primitives, optional type annotations, and how--typecheckcatches mismatches. - Functions and contracts —
fn+requires+ensures, and what--auditreports back. - Live blocks — the self-healing construct: how retries work, how to read the runtime telemetry.
- Verifying with Z3 —
build with
--features z3, emit a certificate, re-verify it with stock Z3.
Conventions
Code blocks marked ```resilient are runnable as-is:
resilient path/to/snippet.rz
Copy-paste any one of them into a .rz file and run it.
Install the VS Code extension
for syntax highlighting and one-click run. See the
syntax reference for the grammar.
If you’d rather start with the grand tour, the getting-started guide is the 60-second version; the tutorial is the 30-minute version.