Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Budget

cinnabar:extension/budget@0.1.0

Introspection of the running callback’s own execution allowance. It reads no game state and grants no game capability, so it needs no grant.

Grants: None; only the current callback allowance is exposed.

Types

Functions

remaining-fuel

remaining-fuel: func() -> u64;

Fuel left in the running callback, about the WebAssembly instructions it may still execute before it traps. Mods use it to spread large work over later callbacks.