MAX can now be used in Google Colab

This support for building and running Mojo code in a Jupyter notebook cell has been added into the mojo package, so in Colab you can now

import mojo.notebook

and compile and run Mojo code in a cell using

%%mojo

# Mojo code here

This even extends to building Mojo packages from a notebook cell, using the syntax

%%mojo package -o custom_ops.mojopkg

# Mojo code here

The newly simplified Mojo notebook example now uses this import.

3 Likes