Hey, using the C ffi from C++. It's kind of annoying having a million deleters for every type, have you guys considered making a generic ptr type that boxes the real type alongside the dtor? Meaning you could call wasm_delete(any_wasm_c_type);
Like this:
#[repr(transparent)]
pub struct CWasmPtr {
pub value: Box<dyn Any>,
}
Would also let you use unique ptr's with custom deleters from the cpp side, instead of raw pointers.
Also looking at https://docs.wasmtime.dev/examples-c-wasi.html, there's a wasm_instance_t
that isn't used anywhere
nvm, just found out the C API is based off https://github.com/WebAssembly/wasm-c-api.
Last updated: Dec 23 2024 at 12:05 UTC