Language supportalpha
Which Motoko and Internet Computer features moxzi supports, which are partial, and which aren't supported.
moxzi compiles Motoko as defined by moc 2.0.0. Programs that compile with moc compile with moxzi and behave the same way. moxzi also adds Nat256 and Nat128.
Supported#
| Area | Includes |
|---|
| Actors | actors (persistent by default), actor classes, actors creating actors, one message at a time, rollback on trap |
| Async | async, await, async*, await*, futures, re-entrant calls between actors |
| Upgrades | Enhanced orthogonal persistence, migration functions, migration chains (--enhanced-migration, --stable-baseline), stable-signature checks |
| Language | Generics, implicit arguments, mixins and include, and/or patterns, do ? { }, !, floating-point literals (bit-exact) |
| Candid | to_candid, from_candid, idl: imports of .did files |
| Packages | mops packages, --package |
| System features | Timers, heartbeats, cycles, HTTPS outcalls with transforms, threshold ECDSA, environment variables, on_low_wasm_memory, best-effort responses |
| Management canister | Create, install (including chunked), snapshots, canister info |
| HTTP | http_request and http_request_update, with every HTTP method under moxzid |
| moxzi additions | Nat256 and Nat128, actor* (in-process actors) |
Partial#
| Feature | Status |
|---|
| Warnings | Some warnings moc reports aren't reported yet. A build with no warnings from moxzi can still have warnings from moc |
| Error message wording | Codes match moc. Some messages are worded differently, and a few show the compiler's internal type notation |
| Long error explanations | moc --explain has no equivalent |
Not supported#
| Feature | What happens |
|---|
Serializing a mutable array ([var T]) through Candid aliasing | The program traps with SERIALIZE-GAP mutable array (write_alias) |
| A language construct moxzi hasn't implemented | Error M9000 unimplemented: …. Please report it |
| Classical persistence | Not supported: every actor uses enhanced orthogonal persistence. Upgrading a canister that still uses classical persistence needs --enhanced-orthogonal-persistence |
| Certified data outside the Internet Computer | moxzid, moxzi-web and actor platforms report that no certificate is available |
The interpreter (moc -r) and the REPL | Not available. Run actors with moxzid |
Limits that apply to every program#
| Limit | Value |
|---|
| Expression or type nesting depth | 128. Deeper nesting is a parse error |
| Depth of a chain of self-calls | 512 |
| Nesting in code compiled in a browser tab | Lower; see moxzi-web limits |