# Cairo Level 5: Modules & Packages

> Level 5: Modules & Packages of the LoWisa Cairo course: Modules, Scarb, Package Organisation. 3 lessons and 9 ideas, each explained in one line.

Modules & Packages is level 5 of 14 of the [LoWisa Cairo course](/courses/cairo/). It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

## 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

- **Before:** [Level 4: Traits & Generics](/courses/cairo/level-4-traits-and-generics/): Traits, Generic Types, Reusable Cairo Abstractions.
- **Next:** [Level 6: Starknet Contracts](/courses/cairo/level-6-starknet-contracts/): Contract Structure, Storage, External Functions.

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](/help/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.

---

Source: https://lowisa.dev/courses/cairo/level-5-modules-and-packages/ · Updated 2026-11-30
