It's finally here! We released Mojo local download for Linux systems on September 7th, and in just over a month weāve seen tens of thousands of downloads and amazing community projects such as llama.š„ and Infermo . We deeply value your feedback, as Mojicians, and we appreciate every single PR, feature request, and bug report. Some trends are easy to track, and from all the feedback we received, one request stood out on Discord , on social media and was the most upvoted feedback on GitHub :
We heard you loud and clear, and today, we are excited to share that Mojo is now available on Mac (Apple silicon) š
In this blog post, weāll discuss how you can get started with the Mojo SDK on Mac. We'll take a closer look at how to download and install the Mojo SDK on your Mac, and share popular community projects and resources to help you start your Mojo learning journey. We canāt wait to see what youāll build. For a deeper dive on components of the Mojo SDK be sure to check out our launch blog post .
NOTE: This guide is for Mojo on Apple Silicon-based Macs only. Mojo on Intel-based Macs can be installed via Docker containers. Select āSet up on Mac (Intel)ā in the developer console for instructions.
Getting started with Mojo SDK Here are 6 quick steps to experience the power of Mojo on Mac:
First head over to the Modular developer console and sign in or create an account.Ā Once youāre signed in, select āSet up on Macā to see install instructions for Mac You will need the Homebrew package manager to download the Modular CLI. If you donāt already have Homebrew, you can install it from here .Ā With Homebrew installed, follow the instructions on the developer console to install Modular CLI using your authentication code. Use the modular CLI to install Mojo with modular install mojo Finally, follow the instructions on the output to add Mojo to path on your shell You are now ready to run your first āHello Mojoš„ā program using the Mojo REPL. Run :q to exit the REPL environment.
Get the Visual Studio Code extension for Mojo SDK Visual Studio Code is one of the most popular IDEs in the world, and Mojo supports it directly with an official extension on the Visual Studio Marketplace. The extension supports syntax highlighting, diagnostics, definitions and references, hover help, formatting, and code completion.
Watch this video for an overview of using the Mojoš„ Visual Studio Extension š
VIDEO
Mojo SDK on Mac is ā”fast ā” Time for some benchmarking. Open a terminal window and clone the Mojo examples repository:
Bash
$ git clone https://github.com/modularml/mojo.git
$ cd mojo/examples
Copy
Letās run a matrix multiplication example using matmul.mojo. On My Apple MacBook Pro M2 Max, I get about 90,000x speedup over pure Python š¤Æ
Mojo can take full advantage of Mac CPU cores and vector units to achieve these speedups. Read our blog post series on speeding up Mandelbrot code for tips and tricks to vectorize and parallelize Mojo code to accelerate your applications.
Experience the awesomeness of Mojoš„ community projects ā¤ļø In just over a month, Mojo community members have built and contributed amazing projects. Community member and mojician Vilson has compiled a list of popular Mojo projects, so you can get started quickly: https://github.com/mojicians/awesome-mojo
One of the most popular community projects is llama2.mojo by community member Aydyn Tairov with over 1.2k stars on GitHub. You can read all about Aydynās journey from discovering Mojo to building llama2.mojo in his blog post: How I built llama2.mojo . Llama2.mojo is blazing fast on the Mac and delivers ~960 tok/s.Ā
Next steps Weāre really excited about bringing Mojo to the Mac user community. We hope you try it out and share your feedback . Here are other ways to get involved:
Donāt forget to tune in to Modular Community Livestream - Mojoš„ on Mac on Friday, Oct 20th. Weāll discuss all things Mojoš„ on Mac and walk you through getting started, discuss Mac-specific features, and share how to build and run Mojo applications on any host! We have a lot of cool demos and a guest speaker.
Lastly, if you were in our Discord last night - you'll have found our Easter Egg š„ - we gave our Discord community access to Mojo š„ on Mac early! Join the Discord now for future early access.
ā