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.
Mojo achieves this feat by utilizing next-generation compiler technologies with integrated caching, multithreading, and cloud distribution technologies. Furthermore, Mojo’s autotuning and compile-time meta-programming features allow you to write code that is portable to even the most exotic hardware.
When we started Modular, we had no intentions of building a new programming language. But as we were building our platform with the intent to unify the world’s ML/AI infrastructure, we realized that programming across the entire stack was too complicated. Plus, we were writing a lot of MLIR by hand and not having a good time
The Mojo language is still very young, but we want your feedback!
The Mojo standard library, compiler, and runtime are not available for local development yet, so we created a hosted development environment where you can try it out. We call it the Mojo Playground!
- Sign up for access to the Mojo Playground.
- When you receive access, log in to the Mojo Playground using the email address you provided in the above form.
- Chat with us on Discord, report issues on GitHub, and feel free to share your Mojo code with others.
Using the Mojo compiler
You can run a Mojo program from a terminal just like you can with Python. So if you have a file named
hello.—yes, the file extension can be an emoji!), just type
def your_function(a, b): let c = a # Uncomment to see an error: # c = b # error: c is immutable if c != b: let d = b print(d) your_function(2, 3)