moxzi

moxzi documentation

A Motoko compiler written in Motoko, and the runtimes that execute what it builds.

moxzi is a Motoko compiler written in Motoko, together with runtimes that execute Motoko actors with Internet Computer semantics in four places: your laptop, a server, a browser tab, and the Internet Computer itself. It is 0.1.0-alpha.1, source-available under BUSL-1.1, and the pages below try to be exact about what is proven and what is not.

The one idea that explains the rest#

The compiler is an ordinary Motoko program. It has no privileged runtime, no native extensions and no build machine of its own — so anywhere a Motoko actor can run, the compiler can run too.

That single property is what produces everything else in these docs. A canister can compile Motoko because a canister can run a Motoko actor. A browser tab can compile Motoko for the same reason. And because it is one compiler rather than four ports of one, the wasm it emits is byte-identical in all four places — which is the claim the rest of this documentation exists to substantiate.

moxziyour laptop moxzida server moxzi-weba browser tab builderthe IC, on-chain One compiler, one actor runtime parse · typecheck · desugar · IR passes · codegen · link messages · rollback · timers · upgrades · cycles · outcalls written in Motoko, compiled by itself, byte-identical everywhere

Start where you are#

<!--CHAPTERS-->

Proof over promises#

Every claim on this site maps to something you can execute. This is the checklist that runs before anything here is allowed to say "works" — make alpha-check runs all of it.

ClaimProofCommand
The compiler compiles itself on mainnet, byte-identical177 files, 2,345 messages; artifact 830f3e87… matches the local build exactlymoxzi build bin/compiler-canister/Main.mo --remote
A real 661-file application builds on mainnet, byte-identicalevm_engine, 4,138 messages, artifact 178c6429…moxzi build ../evm.mo/src/evm_engine/main.mo --remote
221 programs compile to identical bytes across independent compiler buildstwo-compiler corpus sweepPAR=6 scripts/compiler_byte_neutral.sh
149 programs behave identically in a browser and nativelybrowser corpus sweep, 0 divergingscripts/web_corpus_gate.sh
The native runtime matches a real IC replicadifferential harnessscripts/moxzid_*.sh
Actors survive kill -9 — snapshot and write-ahead-log replaycrash gatescripts/moxzid_crash.sh
An actor can be a website (queries, updates, SSE)11-beat gatescripts/moxzid_web_gate.sh
An actor can be a WebDAV drive, and survives murder16-beat gatescripts/moxzid_webdav_gate.sh
mo: package imports compile in a browser, byte-identical to the CLIbrowser mops gatescripts/web_mops_gate.sh
The resumable parser can be interrupted anywhere without changing bytesseam stormscripts/parse_seam_gate.sh
A runaway message in a browser costs only itself — the actor survives and its neighbours are untouchedmetering gatescripts/web_meter_gate.sh

What a build costs on-chain#

Measured on mainnet on 2026-08-21, against canister xcn6l-iqaaa-aaaai-raq6q-cai. These are observed cycle-balance deltas, not estimates.

BuildSourceMessagesCycles
hello.mo1 file, 217 B52~0.001 T
the compiler, self-compiling177 files, 8.0 MB2,345~1.6 T
evm_engine661 files, 15.3 MB4,138~1.6 T/attempt

Caution: do not price a build from instruction counts. The IC bills work that performance_counter cannot observe — garbage collection, memory operations, scheduling. Measured against real spend, the counter under-reports by 2.3×–3.4×, and the ratio is not constant across workloads. Price from the measured cycle balance instead. That is what settlement does.

What this is not, yet#

This is an alpha, and the honest list is kept as a first-class page rather than a footnote. The headlines: there are no certificates off-chain, because a forged subnet signature would be worse than no signature at all; per-instruction metering in a browser is opt-in, because V8 has no fuel and a module must be instrumented to count its own; moxzid is a single node with one shared auth token; and on-chain builds serialise per canister, where the operator can read uploaded source unless you build from a mops tag.

See Limits for every bound with a number attached, and Open questions for the design problems that are still genuinely unresolved.

License#

Source-available under the Business Source License 1.1 — free for non-commercial use and for commercial development, test and evaluation. Commercial production use and competing hosted offerings require a commercial licence. Each version converts to Apache-2.0 four years after release, with a Change Date of 2030-08-31. This is not OSI open source and we do not call it that.

Next#

On this pageThe one idea that explains the restStart where you areProof over promisesWhat a build costs on-chainWhat this is not, yetLicenseNext