Cairo course

Cairo Level 1: Cairo Foundations

Cairo Foundations is level 1 of 14 of the LoWisa Cairo course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-30

Values and Types

  • felt252. Cairo’s native scalar is the felt252: a field element, the number type proofs are built from.
  • Integer types. Bounded integers: u8 through u256: add checked arithmetic on top of felts.
  • let and mut. let binds immutably; mut opts into mutation: visible at the binding, Rust-style.

Functions

  • fn. A fn declares typed parameters and returns: pub marking what a module exposes.
  • Expressions. Blocks and ifs are expressions: the last expression is the value, no return ceremony needed.
  • Panics. Unrecoverable failure panics: halting execution; recoverable failure prefers typed results.

Control Flow

  • if and match. Cairo branches with if and match: matching enums exhaustively, checked by the compiler.
  • Loops. loop and while iterate: with gas metering bounding what a transaction may run.
  • Recursion. Cairo favours recursion for iteration: the functional shape provers reason about well.

Before and after this level

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.

Frequently asked questions

What does Cairo Level 1: Cairo Foundations cover?

Values and Types, Functions, Control Flow: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Start Here: Programs That Can Prove Their Execution, which covers Cairo and STARK Proofs, Cairo and Starknet.

Learn Cairo on your phone

The first level is free. LoWisa is on Google Play and the App Store.