← 返回日报
精读 预计 3 分钟

Mojo is now open source

摘要

Modular 团队宣布 Mojo 语言在达到 1.0(源码稳定)后,于 Apache 2.0 许可(含 LLVM 例外条款)下全面开源,编译器、工具链及构建语言所需的全部源码已发布在官方仓库。文章给出从源码构建编译器的命令(--config=build-mojo)、使用预编译版本的方式(--config=prebuilt-mojo),以及修改标准库后运行测试的方法;同时说明标准库自 2024 年起接受贡献,但编译器与工具链的贡献要到今年年底才开放。文末还提到 Mojo 此前已开源标准库与大量内核代码,并列出 Qualcomm 收购 Modular 等后续动态。

荐读理由

Mojo 编译器与工具链已开源,你能直接克隆仓库、用一条构建命令从源码编译并跑测试,可迁移到自己的 AI 工程栈里评估或使用

原文

August 18, 2026

Mojo🔥 is now open source!

Modular Team

Company

We are happy to announce that the Mojo🔥 language is now fully open source under the Apache 2.0 license (with LLVM exceptions)! The source code for the Mojo compiler, tooling, and everything else you need to build the language are now available in ourmodular.

The Mojo language is a bold bet: a novel general purpose programming language that goes further than older ones. Mojo integrates the latest in compiler and programming language research to unlock GPUs, AI accelerators, and other advanced compute. For the last four years, Mojo has been developed with an open community, but a closed compiler. Last week Mojo hit 1.0(with source stability), and today we’re excited to open source the entire compiler and toolchain.

Apache 2: A permissive license

The Apache 2.0 license is the gold standard for programming languages and compilers, because it provides great flexibility to be used in all sorts of applications. The LLVM extensions to the license further expand those freedoms for building and distributing binaries compiled from Mojo. We want you to be able to adopt and use Mojo in as many applications as you can imagine.

Our open source approach has been deliberate: we’ve found that small and tight-knit design teams (not committees) are the best for finding the “soul” of a language, but that feedback from a broader community is essential to escape an echo chamber. As such, we first open-sourced the , then released hundreds of thousands of lines of kernel code written in Mojo, tools, and support. We built together with community feedback and public design proposals, and are now open sourcing the compiler. We will continue to open our processes further as Mojo keeps maturing.

All code for the Mojo language is now available at the main modular. First, clone that repository locally:

bash

git clone https://github.com/modular/modular.git

cd modular

Then, to build the Mojo compiler from source and run it against a Mojo file you can use a single build command:

bash

./bazelw run --config=build-mojo KGEN:mojo -- run hello.mojo

At Modular, we use to manage the complex build processes and caching for Mojo and MAX. This one command will download or build everything needed to build the Mojo compiler and the Mojo standard library. The flag --config=build-mojo tells the build system to compile everything from scratch, using the source code on your local system.

This extends to working with the Mojo standard library, where you can modify the compiler or library code and run the full suite of tests via:

bash

./bazelw test --config=build-mojo mojo/stdlib/test/...

If you aren’t working on the compiler itself, you can use the flag --config=prebuilt-mojo and the build system will download the latest nightly binary distribution of the compiler, saving you some compilation time. Note that a prebuilt Mojo compiler is still necessary today if you are customizing MAX kernels or models.

The Mojo standard library has been accepting contributions since 2024, and we’re grateful for everyone that has helped advance the language. One learning (particularly in today’s era of AI coding) is that we need to be deliberate about how we handle contributions. As such, we aren’t ready to take contributions to the compiler and tooling. We aim to accept contributions to the compiler and tooling by the end of this year, and we’ll share more details when we can.

To ask any questions about the Mojo compiler source as you read through it, or to share what you’re working on, please join our forum. Clone the source code and let us know what you’re building with the Mojo language. We’re excited to open Mojo up to the world and see how it grows!

Read more from Modular

View all blogs

Qualcomm Completes Acquisition of Modular

July 29, 2026

Qualcomm to Acquire Modular

June 24, 2026

ModCon 2026: Modular’s Developer Conference

June 17, 2026

Build the future of AI with Modular

Get started - FREE

View Editions

  • Person with blonde hair using a laptop with an Apple logo.
  • Sign up today

  • Signup to our Cloud Platform today to get started easily.

  • Sign Up

  • Magnifying glass emoji with black handle and round clear lens.
  • Browse open models

  • Browse our model catalog, or deploy your own custom model

  • Browse models

Lobsters · 9 赞 · 0 评 讨论 → 阅读原文 →

这条对你有帮助吗?