Reference
The complete Munos surface, organized for lookup. If you're new, the Learn path teaches these pieces in order with a worked example; this section is for when you know what you're after and want the exact rule or signature.
Language
The syntax and semantics of the language itself.
- Syntax & structure — program layout, statements, line rules, comments.
- Types — the primitive types,
image,client, palettes, literals, and conversions. - Variables & constants —
var,const, scope, shadowing. - Operators — arithmetic, comparison, logical, bitwise, and precedence.
- Arrays — declaration, indexing, and the
len/size/push/pop/copyforms. - Structs — composite types.
- Control flow —
if,while,for,break,continue. - Functions — parameters, defaults, named arguments, hoisting.
- Events — the runtime-invoked handlers.
- Client & server —
on client/on serverand shared code.
Builtins
Functions and events the runtime provides. The full list is grouped by job:
- Memory —
read_*/write_*. - Images & drawing — image construction and
drawImage. - Networking & packing —
send,receive,pack,unpack, byte helpers. - Input — gamepad polling and edge events.
- ROM control — pause/resume, ROM identity, disconnect.
- Server & slots — slots, ticks, connection events, hopping.
- Instances — spawning and instance-to-instance messaging.
- Persistence — the key/value store.
- Fetch — outbound HTTP from a client.
- Misc —
print,len, casts, byte helpers.
Appendix
- Cheat sheet — the whole language on one page.
- Buttons & palette — the predefined constants.
Source of truth
This reference is written against the Munos compiler in packages/munos. The builtin signatures come from packages/munos/src/types/builtins.ts, which is the single source of truth the type-checker and code generator both consult.