From 7b9b3ec681e68280399d9c67e01433c2d3acb6c2 Mon Sep 17 00:00:00 2001 From: Henry Gressmann Date: Mon, 24 Aug 2026 15:47:05 +0200 Subject: feat: add host typed reference / gc APIs (#54) - add Store-aware handles for references, GC objects, and exceptions - simplify host value conversion, rooting, and exception propagation - update examples, tests, and documentation - Remove deprecated APIs Signed-off-by: Henry --- examples/resumable.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'examples/resumable.rs') diff --git a/examples/resumable.rs b/examples/resumable.rs index 26b5f47..70b0db1 100644 --- a/examples/resumable.rs +++ b/examples/resumable.rs @@ -29,10 +29,12 @@ fn main() -> Result<()> { let instance = ModuleInstance::instantiate(&mut store, &module, None)?; let count_down = instance.func::(&store, "count_down")?; + // A resumable call returns execution state instead of running to completion. let mut execution = count_down.call_resumable(&mut store, 10_000)?; let fuel_per_round = 128; let mut fuel_rounds = 0; + // Each resume call limits one round. std builds also support wall-clock budgets. let result = loop { fuel_rounds += 1; match execution.resume_with_fuel(fuel_per_round)? { -- cgit v1.3.1