moxzi documentation
moxzi is a Motoko compiler and a set of runtimes for the actors it builds. You write a Motoko actor once, compile it to a wasm module, and run that module wherever it fits:
| Where | Tool | Use it for |
|---|---|---|
| Your machine | moxzi | Compiling Motoko to wasm. Works offline; no dfx or replica needed |
| A server | moxzid | Hosting actors behind HTTP, with durable state and upgrades |
| A browser tab | moxzi-web | Running actors, or the compiler itself, inside a web page |
| An actor platform | moxzi host | Running an actor inside Dapr, Restate, Orleans, Akka, Temporal and others |
| The Internet Computer | the compiler canister | Building on-chain, so anyone can check what source produced a wasm |
| A game | moxzi-game | Writing game logic as Motoko actors, drawn by a shared 3D player |
The wasm is the same in every case. A module built on your laptop can be installed on the Internet Computer, hosted by moxzid or loaded in a browser without being rebuilt.
Start here#
- Install moxzi. One command on macOS and Linux.
- Your first actor. Build a counter, run it, call it, upgrade it. About ten minutes.
- Choose a runtime for what you're building.
Chapters#
moxzi: packages, migrations and errors.Native kernelsCall compiled Rust from Motoko: use published kernels, write your own, and check what you link.ServerHost actors with moxzid: call them over HTTP, keep their state, run them as a service.Actor platformsRun Motoko actors inside Dapr, Restate, Orleans, Akka, Proto.Actor, Cloudflare, Temporal, Ray or wasmCloud.BrowserRun actors in a web page with moxzi-web.On-chain buildsBuild in a canister on the Internet Computer, so anyone can verify what you deploy.moxzi.gameWrite games in Motoko and play them in a shared 3D player. Developer preview.How it worksHow moxzi is put together, and why builds are reproducible.CompatibilityWhat moxzi supports, and where it differs from moc and the Internet Computer.ReferenceCommands, options, endpoints, limits and error codes.Status#
moxzi is in alpha. The compiler targets Motoko 2.0.0: a program that compiles with moc compiles with moxzi and behaves the same way. The runtimes implement Internet Computer message semantics. Where either differs, it's listed in Differences from moc and the IC. Known limits are on each page and collected in Limits.
moxzi is source-available under the Business Source License 1.1. Non-commercial use and commercial development, testing and evaluation are free. Production commercial use and competing hosted services need a commercial license. Each release becomes Apache-2.0 four years after it ships.