Repository navigation
How to install
This guide installs the pinned Mojo toolchain into a local .venv. Nothing is installed system-wide. At the end, make check-cpu passes.
| Platform | Support | Note |
|---|---|---|
| macOS | Yes | Apple Silicon only. Mojo does not support Intel Macs. |
| Linux | Yes | x86-64 and aarch64. |
| Windows | Through WSL 2 | Mojo has no native Windows build. |
You also need Python 3.9 or later, git, make and uv.
- Install the tools:
brew install uv xorg-server
xcode-select --installxorg-server gives Xvfb and libX11. The window tests start an Xvfb server. See Windowing and controls.
- Clone and install the toolchain:
git clone https://github.com/SethKitchen/ThreeMojo.git
cd ThreeMojo
uv python install --no-bin 3.12.14
"$(uv python find --managed-python --no-project 3.12.14)" -m venv --without-pip --prompt ThreeMojo .venv
uv pip install "mojo==1.1.0"- Install the tools. On Debian or Ubuntu:
sudo apt update && sudo apt install -y build-essential curl git xvfb
curl -LsSf https://astral.sh/uv/install.sh | shOn Fedora, use sudo dnf install -y make gcc git curl xorg-x11-server-Xvfb. On Arch, use sudo pacman -S --needed base-devel git curl xorg-server-xvfb. The window tests start an Xvfb server.
- Clone and install the toolchain:
git clone https://github.com/SethKitchen/ThreeMojo.git
cd ThreeMojo
uv python install --no-bin 3.12.14
"$(uv python find --managed-python --no-project 3.12.14)" -m venv --without-pip --prompt ThreeMojo .venv
uv pip install "mojo==1.1.0"- Open PowerShell as Administrator and install WSL 2:
wsl --install -d Ubuntu- Reboot. Open the Ubuntu terminal.
- Follow the Linux steps above.
Clone into the Linux filesystem, for example ~/ThreeMojo. Do not clone into /mnt/c/. Builds across the filesystem boundary are much slower.
The environment uses an upstream CPython that uv manages. make coverage refuses an interpreter that loads import hooks. Homebrew's Python loads a sitecustomize module, and uv venv adds an import hook, so neither can measure coverage. CI builds its environment the same way.
python3 -m venv .venv
.venv/bin/pip install "mojo==1.1.0".venv/bin/mojo --version # Mojo 1.1.0 (8189361e)
make check-cpumake check-cpu needs no GPU and no MAX. For the GPU backend, see How to use the GPU backend.
| Component | Version | Needed for |
|---|---|---|
| Mojo |
1.1.0 (8189361e) |
Everything |
| MAX | 26.6.0 |
render/gpu.mojo and its tests only |
| Metal toolchain | Xcode component | GPU kernels on macOS |
| Xvfb | Any | tests/test_x11.mojo |
The toolchain version is part of the build cache key. An upgrade invalidates every cached result.
The pin is exact, not a floor. Mojo 1.1 moved the async task runtime behind an underscore, and moved gpu out of std into max. So one source cannot serve both 1.0 and 1.1: 1.0 has no std.runtime._asyncrt, and 1.1 has no std.runtime.asyncrt. See Rasterization and GPU backend.
The repository pins three Modular skills that teach an AI agent to write Mojo. skills-lock.json is committed; the fetched skills are not.
npx skills experimental_install # restore the pinned skills
npx skills update -p -y # bump them, and rewrite the lockfileThey land in .agents/skills/ or .claude/skills/. Both are ignored by git. Neither the build nor the tests read them, so this step is optional.
The Mojo language server does not read -I .. The repository ships .vscode/settings.json with "mojo.lsp.includeDirs": ["."], which fixes the imports.
- Install the Mojo extension by Modular.
- Reload the window. The setting is read at language-server startup.
The value must be ".". The extension does not expand ${workspaceFolder}.
The Makefile calls .venv/bin/mojo by path. You do not need to activate the virtualenv. If you want to:
| Shell | Command |
|---|---|
| bash or zsh | source .venv/bin/activate |
| fish | source .venv/bin/activate.fish |
| PowerShell | .venv\Scripts\Activate.ps1 |
Tutorials
How-to
Reference
- Scene graph
- Rotations
- Cameras
- Geometry
- Geometry addons
- Lofts and clipping groups
- Sculptor
- Procedural generators
- Meshes and assets
- Lines
- Points and sprites
- Helpers
- Scene objects
- Animated objects
- Raycasting
- Curves and paths
- Animation
- Skinning
- Materials
- Node materials
- TSL functions
- Lights
- Lighting addons
- Fog
- Textures
- Renderer
- Renderer hooks and material flags
- Rasterization
- GPU backend
- Render target
- Post-processing
- GPU computation
- Compute nodes
- Progressive light map
- Gaussian splats
- Voxel global illumination
- SVG renderer
- Image files
- Image decode queue
- Model files
- More model files
- Exporters
- Scene JSON
- Windowing and controls
- Math
- Norm consumers
- Math addons
- Units
- Coverage tool
- Commands
- Examples
- Benchmarks
- Extensions
- Shared physics
- Physics query snapshots
- Continuous collision
- Tick force restoration
- Water
- Streamline
- Animals
- Buildings
- CARLA
- Femur
- Tibia
- Fibula
- Patella
- Knee
- Muscles
- Vessels
- Lymph
- Nerves
- Integument
- Leg
- Foot
- Pelvis
- Torso
- Arm
- Hand
- Head
- Genome
- Game humanoid
- Humanoid fidelity
- Audio-aligned game faces
- Converted assets
- Mesh quality
- Segment inertia
Explanation
- Software rasterizer
- Scene graph as an array
- Linear color
- Normals are not colors
- Perspective correction
- Fixed-point coverage
- Per-fragment shading
- Mipmaps
- Sorted transparency
- Types and checks
- Render hooks as a trait
- Shared CPU and GPU code
- Bands and threads
- PNG structure
- Extensions beside the port
- CUDA teardown hang
- Mojo compiler hang