# Zig Level 7: Modules & Build System

> Level 7: Modules & Build System of the LoWisa Zig course: Modules, Zig Build, Dependencies and Cross Compilation. 3 lessons and 9 ideas, each explained in one line.

Modules & Build System is level 7 of 11 of the [LoWisa Zig course](/courses/zig/). It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

## Modules

- **Files as structs.** A Zig file is a **struct**: @import returns it, and its pub declarations are the API.
- **@import.** **@import** wires modules: std, dependencies and your files, one mechanism.
- **Visibility.** **pub** marks what leaves a file: everything else private by default.

## Zig Build

- **build.zig.** The build system is **Zig** itself: build.zig scripting compilation as code.
- **Build steps.** Builds declare **steps**: executables, tests, options: a build graph, not a config file.
- **Package manager.** Dependencies pin by hash in the **manifest**: reproducible builds by construction.

## Dependencies and Cross Compilation

- **Cross targets.** A **target** flag builds for any platform: musl Linux from Windows, ARM from x86.
- **Vendoring C.** Zig builds can compile **C** dependencies directly: one build graph, both languages.
- **Small dependency culture.** Zig culture keeps dependencies **few**: the standard library first, always.

## Before and after this level

- **Before:** [Level 6: Comptime](/courses/zig/level-6-comptime/): Compile-Time Evaluation, Generic Programming, Compile-Time Code Generation.
- **Next:** [Level 8: C Interoperability](/courses/zig/level-8-c-interoperability/): Calling C, Exporting Zig, Replacing or Extending C Components.

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 Zig Level 7: Modules & Build System cover?

Modules, Zig Build, Dependencies and Cross Compilation: 3 lessons and 9 ideas.

### What should I know before this level?

The level before it, Level 6: Comptime, which covers Compile-Time Evaluation, Generic Programming, Compile-Time Code Generation.

## Learn Zig on your phone

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

---

Source: https://lowisa.dev/courses/zig/level-7-modules-and-build-system/ · Updated 2026-11-25
