m0serve Realtime from a synchronous Python app

Documentation

Every page on this site, grouped by what it is for.

Every page, grouped by what it is for. For the project's current state, uv run poe milestones computes the milestone conditions from SPEC.md and the roadmap; CI prints it on every pull request. 1.0 has shipped, so it reports whether those conditions still hold — a released version does not stop the soak going stale.

Start here

page contents
Quickstart Live updates between browser tabs from one file of synchronous Django, in five steps. CI runs every command on it.
After the quickstart The same application under two workers, in Flask, and under gunicorn.
demo.m0serve.dev The quickstart's two-tab sync, live. apps/demo is the file, deploy/demo the deployment.
blobs.m0serve.dev An application written in Mojo, served from an image with no Python in it: one world stepped on the server and streamed to every tab. apps/blobs is the app, deploy/blobs the deployment, which each release makes from 1.5.0.
Running m0serve Flags, execution modes, what to put in front of it, shutdown and exit codes.
Capabilities One row per capability with the test that proves it. Also spec.json.
WSGI and ASGI modes What each mode is for, what free-threading changes, where each has a cliff.

The Mojo stack

Writing the application itself in Mojo, with the m0 package.

page contents
The Mojo stack What it is for, what it is not, and the m0 command.
Quickstart (Mojo) uvx m0 new to a served page, tests, rebuild on save and an image. CI runs every tagged command on it.
The host Handlers and producers, workers, threads and a handler pool, flags, the doctor, every refusal and exit code.
Views and fragments The views table, fragments for htmx 4 and Datastar, a page or a fragment from one view, URLs, signed sessions.
Deploy The release build, the image and what it measures of itself, Fly.io.
From m0serve to Mojo One views module as a mount inside m0serve and as a binary of its own.

Measurements

Records of something measured, with the environment it was measured in. They age.

page contents
Benchmarks Against gunicorn, uvicorn and Granian: where m0serve wins, where it loses, and how the numbers were taken.
WSGI and ASGI performance Throughput and tail latency for both paths, rendered from dated artifacts.
Server performance The Mojo server serving Mojo handlers, without Python in the path.
Real applications The server against Django projects nobody here wrote.

Project

page contents
Changelog Changes by version.
Roadmap Milestones, known issues with what retires each, what is not planned.
Decisions Standing decisions about the application layer, each with what would retire it.
Design notes The engineering record: dated, long-form, kept as written.
WSGI conformance PEP 3333, clause by clause.
Releasing How a release happens, and the gates CI cannot run.
README The mojo-http repository as a whole: what it is, how to install it, the packages and their example applications, and a link to the page that owns each of the rest (why).
Provenance Where the code came from, and the licensing record.

Mojo packages

For building on mojo-http directly rather than serving a Python application.

page contents
FFI distribution The C-ABI library the m0serve wheel carries, and its licensing position.
SQLite performance m0-sqlite: batch writes, mmap_size, json_each.
SQLite virtual tables Whether virtual tables are reachable from Mojo.

This site

Rendered from these files by scripts/docsite.py and served by m0serve at m0serve.dev, with llms.txt, a Markdown twin of every page, and a sitemap. A new docs/*.md must be added to the generator's page table or check-docs fails naming it; notes under docs/notes/ are picked up on their own. spec.json is generated from SPEC.md by poe render-spec; edit the tables, never the JSON. deploy/site is the deployment.