wasmgc
A Rust implementation of WasmGC.
Create and mutate objects on the WebAssembly engine's garbage-collected heap from Rust:
Gc<T>holds a managed object;#[wasmgc]defines structs and their accessors.GcArray<T>holds a fixed-length array of scalars or references.ExternRefkeeps host values alive and lets GC objects store them directly.
use ;
let counter = new;
counter.set_value;
assert_eq!;
Compile your application to Wasm, then run the wasmgc post-link tool to supply
GC instructions and reference adapters. Imported and exported functions can
exchange native GC references with the host.