Skip to main content

May 2026 (v0.10.82)

This release is mostly about how you find and install Mochi rather than what the language does. The first proper documentation site goes live, the install story shrinks to a single curl command, and the run command gains an inline expression flag so quick checks no longer need a scratch file. Everything else is the usual flow of bytecode tweaks and SPOJ corpus additions.

Documentation site at mochi-lang.dev

The full manual, reference, vision, roadmap, and changelog now live at mochi-lang.dev. The site is built with Docusaurus and deployed to Cloudflare Pages on every push to main that touches website/.

A few things worth knowing if you have been reading the in-repo SPEC.md or README.md:

  • The manual is paginated by topic (basics, types, control flow, errors, packages, agents, streams, generative AI, datasets, FFI). Each page opens with a one-line definition and runs through worked examples.
  • Every code block uses a Prism grammar written for Mochi, so keywords, string interpolation, type names, and generate-style block fields are highlighted correctly. No more reading green-on-green.
  • The reference section covers operators, keywords, and built-ins as tables. If you came here looking for "what does | do", that is the page you want.
  • The roadmap describes what is in flight for v0.11 (generics with type bounds, error propagation ?, async/await, interfaces) and what stays off the table for 1.0 (operator overloading, macros, inheritance, an in-tree web framework).

The website source lives at website/ in the main repo. PRs that improve prose or examples are welcome.

One-line install

curl -fsSL https://get.mochi-lang.dev | sh

The script picks the right tarball for your platform from the GitHub release, drops mochi into ~/.mochi/bin, and prints the line to add to your shell profile. No package manager, no Go toolchain, no sudo. The binary is statically linked, so the same artifact runs on glibc and musl Linux as well as Apple Silicon and Intel macOS.

If you want a specific version, set MOCHI_VERSION=v0.10.82 before running. If you want a different prefix, set MOCHI_INSTALL=/opt/mochi.

The Docker image at ghcr.io/mochilang/mochi:0.10.82 and the manual make build path both still work, with the same binary inside.

mochi run -e '<expr>'

You can now run an inline expression without writing a file:

mochi run -e 'print("ready")'
mochi run -e 'let xs = [1,2,3] in print(reduce(xs, 0, fun(a,b) => a + b))'

The expression goes through the same parser, type checker, and bytecode VM as a .mochi file, so behavior matches what mochi run script.mochi would do. This is what the install verification step looks like now:

mochi --version
mochi run -e 'print("ready")'

If you pass both -e and a file, the command errors out rather than guess which one you meant. The flag is wired up under the cobra surface and the lighter arg parser used by the bundled fang integration, so both mochi run -e ... and mochi run --expr=... resolve the same way.

Generative AI examples updated

The model examples across the manual and the home page now use provider names that match what people actually call in May 2026: gpt-5.5-mini from OpenAI, claude-opus-4.7 from Anthropic, and gemini-2.5-flash from Google. The provider field on model blocks recognizes "openai", "anthropic", "google", and "ollama" out of the box, with anything else passing through to the runtime configuration unchanged.

A short multi-provider routing snippet was added to the Generative AI manual page so the typical "fast model for drafts, deep model for polishing, cheap model for tagging" pattern is one copy-paste away.

Compatibility

Source compatibility is unchanged from v0.10.81. The new -e flag adds a flag to mochi run, and the positional <file> argument is now optional when -e is supplied. Scripts that always pass a file path keep working with no edit.

Other

  • Lighter cream surface palette on the website. The earlier tone read as warm brown on some displays.
  • Favicon background is transparent again.
  • Code-block toolbar buttons are ghost-style, fading in on hover, after feedback that the previous filled buttons looked dated.
  • SPOJ and LeetCode corpus additions through commit 7a1b7c2 (LeetCode 716 Max Stack, 715 Range Module, 711 Distinct Islands II, 710 Random Pick with Blacklist, 699 Falling Squares).

Upgrade

curl -fsSL https://get.mochi-lang.dev | sh
mochi --version # 0.10.82

Or, with Docker:

docker pull ghcr.io/mochilang/mochi:0.10.82

Or, from source:

git pull && make build