Cairo course

Cairo Level 5: Modules & Packages

Modules & Packages is level 5 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

Modules

  • Modules. Code organises in modules: mod blocks and files, use bringing paths into scope.
  • Visibility. Items are private unless pub: the public surface declared name by name.
  • Project layout. A package’s src tree mirrors its module tree: navigation by convention.

Scarb

  • Scarb. Scarb is Cairo’s package manager and build tool: manifest, dependencies, build, one tool.
  • Scarb.toml. The manifest declares name, version and dependencies: pinned for reproducible builds.
  • Workspaces. Workspaces hold sibling packages: protocol, tests and scripts building together.

Package Organisation

  • Library versus contract. Packages split pure libraries from Starknet contracts: logic testable off-chain.
  • Dependency hygiene. Every dependency ships in your trusted base: audited on entry, pinned by version.
  • Docs and examples. Packages carry examples and docs: the ecosystem is young, and your README is its textbook.

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 5: Modules & Packages cover?

Modules, Scarb, Package Organisation: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 4: Traits & Generics, which covers Traits, Generic Types, Reusable Cairo Abstractions.

Learn Cairo on your phone

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