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#
moc | moxzi | |
|---|---|---|
| Default build | Debug (debug { } kept) | Release. Use --debug |
.did file | With --idl | Always, unless --no-idl |
| Candid metadata | Private | candid:service and candid:args public |
| An actor nested inside an expression | M0069, M0037 and M0038 | M0069 only |
| Some parse errors | M0001 | M0000 |
| Warnings | All of moc's | A subset. See Language support |
| Unimplemented constructs | M9000 | |
Interpreter, REPL, --check, --error-format | Available | Not available |
The Coming from moc page maps every flag.
From a canister, in moxzid and moxzi-web#
| On the IC | In moxzid and moxzi-web | |
|---|---|---|
| Certified data | Available | Not available (ic0.data_certificate_present is 0) |
| Caller identity | Signed by the caller | Anonymous, or set by the x-caller header without authentication |
raw_rand | Random | Derived from a per-server seed, so a replayed message gets the same bytes |
| Time | The subnet's time | The host clock, recorded so replay sees the same value |
| HTTPS outcall responses | Agreed by the subnet | One fetch, recorded so replay sees the same response |
HTTP methods reaching http_request | Those the boundary nodes allow | All, including WebDAV methods |
| Trap messages | IC0503 and an explanation | The same first line |
| Instruction limits in a browser | Enforced | Only 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.