A collection of sample programs and Mojo notebooks written in the
Mojo programming language.
Access a Mojo programming environment available from the
Mojo product page.
Git clone the repository of Mojo samples using the command below:
git clone https://github.com/modularml/mojo.git
Use the following sample command-line to run the programs:
mojo matmul.mojo
You can run the Mojo notebooks using JupyterLab or Visual Studio
Code with the Mojo extension available on the Marketplace.
The repo also contains a Dockerfile that can be used to create a
Mojo SDK container for developing and running Mojo programs. Use the
container in conjunction with the Visual Studio Code devcontainers
extension to develop directly inside the container.
The Dockerfile also sets up a conda
environment and by default,
starts a jupyter
server (which you can access via the browser).
The Mojo examples and notebooks in this repository are licensed
under the Apache License v2.0 with LLVM Exceptions
(see the LLVM License).
Thanks for your interest in contributing to this repository!
We are not accepting pull requests at this time, but are actively
working on a process to accept contributions. Please stay tuned.