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
- Modules and Imports
- Building a .mojopkg
- Public APIs and Structure
- Project Layout Best Practices