Expand description
Space-level code generation.
Generates the top-level exported functions:
init()— initialise state to defaults (gas limit set to default constant)dispatch_action(action_id: i32, payload_ptr: i32, payload_len: i32)— run an actionrender(view_id: i32) -> i32— render a view to Surface treeget_state() -> i32— return current state as a record value ptr- Conditionally:
update(dt_ptr: i32),handle_event(event_ptr: i32)
Functions§
- emit_
dispatch_ action - Emit the
dispatch_action(action_id: i32, payload_ptr: i32, payload_len: i32)function. - emit_
get_ state - Emit the
get_state() -> i32function — returns the current state record. - emit_
handle_ event - Emit
handle_event(event_ptr: i32)— param is a record value pointer. - emit_
init - Emit the
init()function (parameterless). - emit_
render - Emit the
render(view_id: i32) -> i32function. - emit_
update - Emit
update(dt_ptr: i32)— param is a NUMBER value pointer.