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. Fuel carries across suspension and is never refilled. Time yields are not overruns. Frame and world-entry allowances are FRAME_FUEL and WORLD_ENTRY_FRAME_FUEL in mod-host; the shared pool is TOTAL_MOD_FRAME_FUEL in mod-api. See the generated limits reference.