The Mojo Manual

A guide to the Mojo programming language · Web editionFree to read, no login

87 example cells in this edition were compiled and run during the build with Mojo 1.1.0 (8189361e) — open Show output under a code sample to see what the program really printed.

  1. 1 Get Started
  2. 2 Language Basics
  3. 3 Value Ownership
  4. 4 Value Lifecycle
  5. 5 Metaprogramming
  6. 6 Pointers
  7. 7 GPU Programming
  8. 8 TileTensor
  9. 9 Layouts and LayoutTensor
  10. 10 Python and C Interop

Adapted from the Mojo Manual and the MAX GPU programming guides, part of the Modular Platform repository (github.com/modular/modular), Copyright (c) Modular Inc., licensed under the Apache License v2.0 with LLVM Exceptions. Changes were made: reformatted as an accessible XYZ web edition with build-verified example outputs. Mojo and MAX are trademarks of Modular Inc.; this edition is not affiliated with or endorsed by Modular.

License: Apache-2.0 WITH LLVM-exception. Licensed under the Apache License, Version 2.0, with LLVM Exceptions; a copy of the license is included with this edition. This is a modified version of the original documentation.

Read the full license text. Source pinned at tag mojo/v1.1.0; example outputs verified with Mojo 1.1.0 (8189361e).

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or any other accessibility standard. Every page is built against an automated accessibility gate, and our target for the published editions is WCAG 2.2 Level AA. If something is unusable, please tell us.