moxzi
Docs / Compatibility / Language support

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#

AreaIncludes
Actorsactors (persistent by default), actor classes, actors creating actors, one message at a time, rollback on trap
Asyncasync, await, async*, await*, futures, re-entrant calls between actors
UpgradesEnhanced orthogonal persistence, migration functions, migration chains (--enhanced-migration, --stable-baseline), stable-signature checks
LanguageGenerics, implicit arguments, mixins and include, and/or patterns, do ? { }, !, floating-point literals (bit-exact)
Candidto_candid, from_candid, idl: imports of .did files
Packagesmops packages, --package
System featuresTimers, heartbeats, cycles, HTTPS outcalls with transforms, threshold ECDSA, environment variables, on_low_wasm_memory, best-effort responses
Management canisterCreate, install (including chunked), snapshots, canister info
HTTPhttp_request and http_request_update, with every HTTP method under moxzid
moxzi additionsNat256 and Nat128, actor* (in-process actors)

Partial#

FeatureStatus
WarningsSome warnings moc reports aren't reported yet. A build with no warnings from moxzi can still have warnings from moc
Error message wordingCodes match moc. Some messages are worded differently, and a few show the compiler's internal type notation
Long error explanationsmoc --explain has no equivalent

Not supported#

FeatureWhat happens
Serializing a mutable array ([var T]) through Candid aliasingThe program traps with SERIALIZE-GAP mutable array (write_alias)
A language construct moxzi hasn't implementedError M9000 unimplemented: …. Please report it
Classical persistenceNot supported: every actor uses enhanced orthogonal persistence. Upgrading a canister that still uses classical persistence needs --enhanced-orthogonal-persistence
Certified data outside the Internet Computermoxzid, moxzi-web and actor platforms report that no certificate is available
The interpreter (moc -r) and the REPLNot available. Run actors with moxzid

Limits that apply to every program#

LimitValue
Expression or type nesting depth128. Deeper nesting is a parse error
Depth of a chain of self-calls512
Nesting in code compiled in a browser tabLower; see moxzi-web limits
On this pageSupportedPartialNot supportedLimits that apply to every program