{ "comment": "What the Mojo corpus is built from. Edit this to move to a new Mojo version, then run `python3 scripts/mojo/corpus.py harvest` and `verify`. See docs/mojo-corpus.md.", "mojo": { "version": "1.2.0" }, "godbolt": { "base": "https://godbolt.org", "compiler": "mojo_1_2_0", "concurrency": 2, "timeoutSeconds": 90 }, "build": { "comment": "How every Mojo program is built, wherever Programming+ builds one or asks godbolt to: these arguments, then the program's own (a probe's `# args:`, the Compile button's level), an option the program names replacing the one here. Read from here by core's scripts/mojo/mojocorpus (verify, mojo-run), scripts/library_godbolt.py, and through src/mojo/generated/pin.ts by src/services/godbolt.ts (the Compile button), scripts/library.mjs, scripts/mojo/local.mjs, fuzz.mjs and listings.mjs; core's tests/build-args.test.mjs fails on a builder that writes flags of its own. A stored answer is keyed by every argument, so a change here leaves every answer unverified until `pixi run mojo-verify` and `library-verify-mojo` ask again. A reader's own `mojo build`, with none of these, targets the CPU it runs on and may fuse a multiply with an add (core's docs/trust.md).", "args": "--target-cpu x86-64-v3 --fp-mode contract=off", "why": { "--target-cpu x86-64-v3": "Without it `mojo build` targets the CPU it runs on, so a godbolt listing depended on which of godbolt's machines answered: AVX2 (ymm) one hour, AVX-512 (zmm, kmovq, vpternlogd) the next, for the same program and arguments (probes/godbolt-target-cpu). x86-64-v3 is AVX2, FMA, BMI1 and BMI2 (Intel's Haswell of 2013 and AMD's Excavator of 2015 onward, and godbolt's machines); it brings no AVX-512, which core's model machine (src/engines/asm86) does not know. On a machine that is not x86-64 the local tools leave it out: Mojo refuses an x86-64 CPU for another target.", "--fp-mode contract=off": "Mojo's default, contract=fast, fuses a multiply with an add or subtract into one rounding wherever the operands arrive at run time (like Clang's -ffp-contract=fast), so a built program's last digit depended on whether the compiler could work an expression out while building and on the machine having FMA (probes/float-contract-runtime: -0.22222222222222224 from stdin, -0.2222222222222222 from a literal). With contraction off every Float64 operation is rounded on its own, as IEEE 754 says and as the pseudo interpreter and core's Mojo interpreter compute, on every machine (probes/float-contract-runtime-off). This one is the owner's to change: without it, the interpreter's rule (print what the compiler prints, or decline) does not hold for a * b + c, and the corpus and the library's references must be asked again." } }, "sources": { "modular": { "repo": "modular/modular", "ref": "mojo/v1.2.0", "note": "The compiler, stdlib, manual, release notes, and compiler tests. Mojo releases are tagged mojo/vX.Y.Z in this repository (the platform's own tags are modular/vX.Y). Only the stdlib and the release notes are required to be present; a processor whose inputs are missing at a ref (the compiler sources, say) is skipped with a warning and keeps its previous output.", "markers": ["stdlib/std/prelude/__init__.mojo", "docs/site/releases"], "license": "Apache-2.0 WITH LLVM-exception (per file headers; confirm the docs carry the same license)", "licenseCheck": { "commit": "527d069ee11a41ac5320af1f9402db0a66b2b868", "on": "2026-11-12", "file": "LICENSE", "copy": "licenses/modular-LICENSE.txt", "sha256": "077ecef8fc610215df3319c555c2fa1b4d28df60ee67a72946b9338cbc90a8a0", "says": "The root LICENSE is Apache-2.0 WITH LLVM-exception for the whole repository, and the README says the repository and its contributions are under it; nothing carves out docs/. Licenses/LICENSE is the MAX Community License, which Licenses/README.md says ships with Modular's packaged products, not the repository's sources. The docs' .mdx pages carry no header of their own; docs/site/code/*.mojo carry Modular's Apache-2.0 WITH LLVM-exception header." } }, "mojo-quest": { "repo": "modular/mojo-quest", "repoConfirmed": false, "ref": "8e884a70986676cb45b0b149c073be79d9925a90", "note": "Mojo Quest pins mojo_1_2_0 itself (src/lib/compile.ts), so its main branch at a commit where that is still true is the right ref. The repository name is inferred: the zip carries no remote URL.", "markers": ["src/data/issues.ts", "exercises"], "license": "Apache-2.0 WITH LLVM-exception per file headers; the repo has no LICENSE file, so confirm with Modular before showing exercises to students", "licenseCheck": { "commit": "8e884a70986676cb45b0b149c073be79d9925a90", "on": "2026-11-12", "file": null, "says": "The repository github.com/modular/mojo-quest is public and holds this commit (so the inferred name is right); at this commit it has no LICENSE, COPYING or NOTICE file; its README and package.json name no license. exercises/*.mojo carry Modular's Apache-2.0 WITH LLVM-exception header; src/data/issues.ts (the starters and the ticket text) carries none." } }, "mojo-syntax": { "repo": "modular/mojo-syntax", "ref": "48cdeac4f6b542e0b50666a5725fdfadf6188836", "markers": ["syntaxes/mojo.syntax.json", "tests"], "license": "MIT", "licenseCheck": { "commit": "48cdeac4f6b542e0b50666a5725fdfadf6188836", "on": "2026-11-12", "file": "LICENSE", "copy": "licenses/mojo-syntax-LICENSE.txt", "sha256": "18371748d08785f1ae85949cbb62f064e039959f91ef2784ff72a34f588c8636", "says": "MIT, copyright Modular Inc., MagicStack Inc. and Microsoft Corporation. The MIT notice must go with copies of the grammar." } }, "vscode-mojo": { "repo": "modular/vscode-mojo", "ref": "e7f673213c2d44c4494af10cd307afe3b4bde0b3", "markers": ["language-configuration.json", "package.json", "extension"], "license": "Apache-2.0", "licenseCheck": { "commit": "e7f673213c2d44c4494af10cd307afe3b4bde0b3", "on": "2026-11-12", "file": "LICENSE", "copy": "licenses/vscode-mojo-LICENSE.txt", "sha256": "e6e21f3fccb94da9bd3f3adf3bf69d79e1f4ed69fb0ec42f015ff405798ede26", "says": "Apache-2.0 (the plain license, no LLVM exception), with no NOTICE file." } }, "skills": { "repo": "modular/skills", "ref": "c18d0e2b34e90c1acb6fd20ab6e77605f1e91a5d", "note": "The skill targets the latest Mojo, which can be ahead of the pin; its table is a list of candidates, not a ruling.", "markers": ["mojo-syntax/SKILL.md"], "license": "Apache-2.0 WITH LLVM-exception", "licenseCheck": { "commit": "c18d0e2b34e90c1acb6fd20ab6e77605f1e91a5d", "on": "2026-11-12", "file": "LICENSE", "copy": "licenses/skills-LICENSE.txt", "sha256": "3340babe8ac7bc6ae294d93aa01c310a250d43d5b760e5c12954882d4e5c83c7", "says": "Apache-2.0 WITH LLVM-exception (the LLVM Project's license text, verbatim). mojo-syntax/SKILL.md carries no header of its own." } } }, "dialect": { "comment": "Cheap first look at whether a program fits the pin. `newer`: arrived after the pinned version (from the snapshot's nightly changelog, when the snapshot is past the release). `older`: the pinned version rejects it (from the release notes or the pinned TokenKinds.def). Only verify decides; these only set expectations. Review both lists on every version bump. At 1.2.0 the pin is the release tag, so nothing is newer: what 1.1.0 listed here (match, `not `, __async, hash_bytes, Tuple.first_of, TargetAccelerator) is part of 1.2.0.", "newer": [], "older": [ { "id": "fn", "pattern": "^\\s*fn\\s+\\w", "why": "`fn` removed in 1.1.0 (release notes, Removed); use def" }, { "id": "alias", "pattern": "^\\s*alias\\s+\\w+\\s*[\\[=]", "why": "`alias` removed in 1.1.0 (release notes, Removed); use comptime" }, { "id": "parameter-if-for", "pattern": "@parameter\\s*\\n\\s*(?:if|for)\\b", "why": "@parameter if/for removed in 1.1.0; use comptime if/for" }, { "id": "comptime-assert-legacy", "pattern": "\\b__comptime_assert\\b", "why": "__comptime_assert removed in 1.1.0; use comptime assert" }, { "id": "read-convention", "pattern": "[(,]\\s*read\\s+\\w+\\s*:|\\bread\\s+self\\b", "why": "the read convention is a hard error in 1.1.0; use imm (or nothing)" }, { "id": "owned-convention", "pattern": "[(,]\\s*owned\\s+\\w+\\s*:|\\bowned\\s+self\\b", "why": "`owned` removed in 0.26.2; use var (or deinit)" }, { "id": "inline-array", "pattern": "\\bInlineArray\\b", "why": "the InlineArray alias removed in 1.1.0; use Array" }, { "id": "unsafe-pointer-aliases", "pattern": "\\b(?:MutUnsafePointer|ImmUnsafePointer|ImmutUnsafePointer|ImmutOpaquePointer|ImmutPointer|OptionalUnsafePointer)\\b", "why": "pre-unification pointer aliases removed in 1.1.0" }, { "id": "let", "pattern": "^\\s*let\\s+\\w+\\s*[:=]", "why": "not a keyword in 1.1's TokenKinds.def; use var" }, { "id": "inout", "pattern": "[(,]\\s*inout\\s+\\w+\\s*:|\\binout\\s+self\\b", "why": "not a convention in 1.1's parser; use mut" }, { "id": "async-await", "pattern": "^\\s*async\\s+def\\b|(?