Mojo is an in-development proprietary programming language based on Python[6][7][8] available for Linux and macOS.[9][10] Mojo aims to combine the usability of a high-level programming language, specifically Python, with the performance of a system programming language such as C++, Rust, and Zig.[11][12]Modular, the company behind Mojo, has stated an intent to open source the Mojo language[13], committing to open-source Mojo in “fall 2026”[14]. In May 2026, Modular released the first beta of Mojo 1.0 and launched a website for the language.[15] As of June 2026, the Mojo compiler is closed source with an open source standard library.
Mojo builds on the Multi-Level Intermediate Representation (MLIR) compiler software framework, instead of directly on the lower level LLVM compiler framework like many languages such as Julia, Swift, C++, and Rust.[16][17] MLIR is a newer compiler framework that allows Mojo to exploit higher level compiler passes unavailable in LLVM alone, and allows Mojo to compile down and target more than only central processing units (CPUs), including producing code that can run on graphics processing units (GPUs), Tensor Processing Units (TPUs), application-specific integrated circuits (ASICs) and other accelerators. It can also often more effectively use certain types of CPU optimizations directly, like single instruction, multiple data (SIMD) with minor intervention by a developer, as occurs in many other languages.[18][19] According to Jeremy Howard of fast.ai, Mojo can be seen as “syntax sugar for MLIR” and for that reason Mojo is well optimized for applications like artificial intelligence (AI).[20]
Origin and development history
The Mojo programming language was created by Modular Inc, which was founded by Chris Lattner, the original architect of the Swift programming language and LLVM, and Tim Davis, a former Google employee.[21] The intention behind Mojo is to bridge the gap between Python’s ease of use and the fast performance required for cutting-edge AI applications.[22]
According to public change logs, Mojo development goes back to 2022.[23] In May 2023, the first publicly testable version was made available online via a hosted playground.[24] By September 2023 Mojo was available for local download for Linux[25] and by October 2023 it was also made available for download on Apple’s macOS.[26] The SDK included a command-line driver, a Visual Studio Code extension, and a Jupyter kernel.[10]
In March 2024, Modular open sourced the Mojo standard library and started accepting community contributions under the Apache 2.0 license.[27][28]
In December 2025, Modular published a roadmap toward a 1.0 release, stating that Mojo 1.0 would stabilize core language features and that additional features, such as a match statement and enums, would follow in 1.x releases.[29] On May 7, 2026, Modular released Mojo 1.0.0 beta 1 and launched the language’s website, mojolang.org.[15][30]
Features
Mojo was created for an easy transition from Python. The language has syntax similar to Python’s, with inferred static typing,[31] and allows users to import Python modules.[32][33] It uses LLVM and MLIR as its compilation backend.[8][34][35] Mojo programs can import and call Python modules via the CPython runtime, and Mojo functions can be called from Python through C-compatible bindings.[15] The language is not source-compatible with Python 3. It does not support Python’s class system; instead it provides struct types, memory-optimized alternatives to classes that support methods, fields, operator overloading, and decorators.[36][15] Python-style list, set, and dictionary comprehensions are supported.[37]
The language also provides a borrow checker, an influence from Rust.[38] Function arguments are passed as immutable references by default (the read convention). Functions may instead declare arguments as mutable references (mut) or take ownership of them, and ownership can be transferred with the ^ operator.[15][39]
While the Mojo standard library is open source under the Apache 2.0 license, the compiler is not; Modular has committed to open-sourcing it in fall 2026.[13][14]
Mojo supports GPU programming through a gpu package in its standard library.[15] A 2025 study by Oak Ridge National Laboratory researchers presented at the SC25 WACCPD workshop found Mojo’s GPU kernels broadly competitive with CUDA and HIP for memory-bound workloads on Nvidia and AMD accelerators, while noting performance gaps for atomic operations and fast-math compute-bound workloads on AMD GPUs.[40]
Programming examples
Functions in Mojo are declared with def. Earlier versions also provided an fn keyword for stricter, statically typed functions; fn was deprecated in 2026 in favor of using def for all functions.[41][42] Functions may declare typed parameters and return types:
def add(x: Int, y: Int) -> Int:
"""A typed addition."""
return x + y
Variables may be declared explicitly with var, which gives block-level scope, or implicitly by assignment, which gives function-level scope matching Python’s behavior:[43]
def main():
var total = add(1, 2) # explicitly declared
doubled = total * 2 # implicitly declared
print(doubled)
Mojo originally included a let keyword for immutable bindings;[36] it was removed from the language in 2024.[44]
Structs are Mojo’s compile-time-laid-out alternative to Python classes. The @fieldwise_init decorator synthesizes a constructor from the declared fields, and traits such as Copyable declare supported behaviors:[15]
@fieldwise_init
struct Point(Copyable, Movable):
var x: Int
var y: Int
def magnitude_squared(self) -> Int:
return self.x * self.x + self.y * self.y
def main():
p = Point(3, 4)
print(p.magnitude_squared()) # 25
Mojo programs can import and use Python modules through the CPython runtime:[33]
from std.python import Python
def main() raises:
math = Python.import_module("math")
print(math.sqrt(2.0))
See also
References
- ^ Sullivan, Mark (19 March 2024). “How Modular simplified AI software infrastructure”. Fast Company. Retrieved 2024-08-19.
- ^ “Mojo Changelog”. Modular. 7 May 2026. Retrieved 2026-05-07.
- ^ “Modular: Community License”.
- ^ “Welcome to the Mojo standard library”.
- ^
- ^ “Mojo programming manual”. docs.modular.com. Modular. 2023. Retrieved 2023-09-26.
Mojo is a programming language that is as easy to use as Python but with the performance of C++ and Rust. Furthermore, Mojo provides the ability to leverage the entire Python library ecosystem.
- ^ “Why Mojo – A language for next-generation compiler technology”. docs.modular.com. Modular. 2023. Retrieved 2023-09-26.
While many other projects now use MLIR, Mojo is the first major language designed expressly for MLIR, which makes Mojo uniquely powerful when writing systems-level code for AI workloads.
- ^ a b Krill, Paul (4 May 2023). “Mojo language marries Python and MLIR for AI development”. InfoWorld.
- ^ Deutscher, Maria (7 September 2023). “Modular makes its AI-optimized Mojo programming language generally available”. Silicon Angle. Retrieved 2023-09-11.
- ^ a b Krzaczyński, Robert (9 November 2023). “Mojo Language SDK Available: Mojo Driver, VS Code Extension, and Jupyter Kernel”. InfoQ.
- ^ “Mojo: Programming language for all of AI”. Modular.com. Retrieved 2024-02-28.
- ^ Krzaczyński, Robert (19 July 2023). “Introduction to Mojo Programming Language”. InfoQ.
- ^ a b Modular Team (28 March 2024). “Modular: The Next Big Step in Mojo🔥 Open Source”. Modular. Archived from the original on 2024-10-09. Retrieved 2024-11-09.
- ^ a b “Mojo FAQ”. Archived from the original on 2026-05-09. Retrieved 2026-05-09.
- ^ a b c d e f g Yegulalp, Serdar (20 May 2026). “First look: Mojo 1.0 mixes Python and Rust”. InfoWorld.
- ^ Krill, Paul (2023-05-04). “Mojo language marries Python and MLIR for AI development”. InfoWorld. Retrieved 2024-05-28.
- ^ “Should Julia use MLIR in the future?”. Julia Programming Language. 2024-02-20. Retrieved 2024-05-28.
- ^ “Modular Docs: Why Mojo”. docs.modular.com. Retrieved 2024-05-28.
- ^ “Mojo – A system programming language for heterogenous computing” (PDF). Archived from the original (PDF) on 2024-05-28.
- ^ Howard, Jeremy (2023-05-04). “fast.ai – Mojo may be the biggest programming language advance in decades”. fast.ai. Retrieved 2024-05-28.
- ^ Claburn, Thomas (2023-05-05). “Modular finds its Mojo, a Python superset with C-level speed”. The Register. Retrieved 2023-08-08.
- ^ Thomason, James (21 May 2024). “Mojo Rising: The resurgence of AI-first programming languages”. VentureBeat.
- ^ “Mojo changelog”. 13 February 2025.
- ^ “A unified, extensible platform to superpower your AI”. Modular.com. Retrieved 2024-04-14.
- ^ “Mojo – It’s finally here!”. Modular.com. Retrieved 2024-04-14.
- ^ “Mojo is now available on Mac”. Modular.com. Retrieved 2024-04-14.
- ^ “Modular open-sources its Mojo AI programming language’s core components”. SiliconANGLE. 2024-03-28. Retrieved 2024-05-28.
- ^ “mojo/stdlib/README.md at nightly · modularml/mojo”. GitHub. Retrieved 2024-05-28.
- ^ “Modular: The path to Mojo 1.0”. Modular. 5 December 2025. Retrieved 2026-06-12.
- ^ “Mojo releases”. Modular. Retrieved 2026-06-12.
- ^ “Modular Docs – Mojo programming manual”. docs.modular.com. Retrieved 2023-10-19.
- ^ “Modular Docs – Mojo programming manual”. docs.modular.com. Retrieved 2023-10-31.
- ^ a b Yegulalp, Serdar (12 November 2025). “Revisiting Mojo: A faster Python?”. InfoWorld.
- ^ Lattner, Chris; Pienaar, Jacques (2019). MLIR Primer: A Compiler Infrastructure for the End of Moore’s Law (Technical report). Retrieved 2022-09-30.
- ^ Lattner, Chris; Amini, Mehdi; Bondhugula, Uday; Cohen, Albert; Davis, Andy; Pienaar, Jacques; Riddle, River; Shpeisman, Tatiana; Vasilache, Nicolas; Zinenko, Oleksandr (2020-02-29). “MLIR: A Compiler Infrastructure for the End of Moore’s Law”. arXiv:2002.11054 [cs.PL].
- ^ a b Yegulalp, Serdar (7 June 2023). “A first look at the Mojo language”. InfoWorld.
- ^ “Mojo v25.4 release notes”. GitHub. Modular. 18 June 2025. Retrieved 2026-06-12.
- ^ “Modular Docs: Ownership and borrowing”. Modular. Retrieved 2024-02-29.
- ^ “Ownership”. mojolang.org. Modular. Retrieved 2026-06-12.
- ^ Godoy, William F.; Melnichenko, Tatiana; Valero-Lara, Pedro; Elwasif, Wael; Fackler, Philip; Ferreira Da Silva, Rafael; Teranishi, Keita; Vetter, Jeffrey S. (2025-09-25). “Mojo: MLIR-Based Performance-Portable HPC Science Kernels on GPUs for the Python Ecosystem”. arXiv:2509.21039 [cs.DC].
- ^ “Functions”. mojolang.org. Modular. Retrieved 2026-06-12.
- ^ “Mojo v26.2 release notes”. GitHub. Modular. 19 March 2026. Retrieved 2026-06-12.
- ^ “Variables”. mojolang.org. Modular. Retrieved 2026-06-12.
- ^ “Mojo v24.1 release notes”. GitHub. Modular. 29 February 2024. Retrieved 2026-06-12.