Cairo course

Cairo Level 3: Ownership & Memory

Ownership & Memory is level 3 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

Cairo Memory Model

  • Write-once memory. Cairo memory is immutable: each cell written once, a property the proof system requires.
  • Linear types. Values move linearly: used once unless the type says otherwise, ownership Rust-style.
  • Why the model exists. The memory model is not style: it is what makes execution provable at all.

References and Snapshots

  • Snapshots. A snapshot (@value) is an immutable view: reading without consuming ownership.
  • ref arguments. A ref argument lets a function mutate the caller’s variable: rebinding tracked explicitly.
  • Desnap. The desnap operator reads through a snapshot: views opened where values are needed.

Designing Safe Data Flow

  • Move by default. Values move into calls: the compiler tracks every owner, double-use fails to compile.
  • Copy and Drop traits. Copy and Drop derive where duplication and disposal are safe: declared, never assumed.
  • Ownership as design. Data flow designs like Rust: one owner, borrows for reading, mutation explicit.

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 3: Ownership & Memory cover?

Cairo Memory Model, References and Snapshots, Designing Safe Data Flow: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 2: Data Structures, which covers Structs and Enums, Pattern Matching, Collections.

Learn Cairo on your phone

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