moxzi
Docs / Compatibility / Differences from moc and the IC

Differences from moc and the ICalpha

Where moxzi behaves differently from the moc compiler and from a canister on the Internet Computer.

From moc#

mocmoxzi
Default buildDebug (debug { } kept)Release. Use --debug
.did fileWith --idlAlways, unless --no-idl
Candid metadataPrivatecandid:service and candid:args public
An actor nested inside an expressionM0069, M0037 and M0038M0069 only
Some parse errorsM0001M0000
WarningsAll of moc'sA subset. See Language support
Unimplemented constructsM9000
Interpreter, REPL, --check, --error-formatAvailableNot available

The Coming from moc page maps every flag.

From a canister, in moxzid and moxzi-web#

On the ICIn moxzid and moxzi-web
Certified dataAvailableNot available (ic0.data_certificate_present is 0)
Caller identitySigned by the callerAnonymous, or set by the x-caller header without authentication
raw_randRandomDerived from a per-server seed, so a replayed message gets the same bytes
TimeThe subnet's timeThe host clock, recorded so replay sees the same value
HTTPS outcall responsesAgreed by the subnetOne fetch, recorded so replay sees the same response
HTTP methods reaching http_requestThose the boundary nodes allowAll, including WebDAV methods
Trap messagesIC0503 and an explanationThe same first line
Instruction limits in a browserEnforcedOnly with meter: true

Programs compute the same results in every runtime. The differences are in what a runtime can prove (certificates, signed callers) and in where non-determinism comes from.

From a canister, on actor platforms#

Actor platforms behave like moxzid in the table above. In addition, an actor can look up another actor by key with moxzi_actor_of, which doesn't exist on the IC.

On this pageFrom mocFrom a canister, in moxzid and moxzi-webFrom a canister, on actor platforms