0Pricing
Mojo Academy · Lesson

Modules and Imports

Split code across files cleanly.

One File Gets Crowded

As a program grows, packing everything into one file gets messy. Splitting code across files keeps each piece small and focused. 📂

A Module Is a File

In Mojo, a single source file is a module. Every .mojo file you write is a module others can import.

All lessons in this course

  1. Modules and Imports
  2. Building a .mojopkg
  3. Public APIs and Structure
  4. Project Layout Best Practices
← Back to Mojo Academy