IIRC, Rust wasm modules export a single Memory object as
memory, and you can directly call any
#[no_mangle] pub fn (don't use
#[wasm_bindgen] since that needs specific JS on the other side) taking and returning only 32 and 64 bit number types (eg u32, f64, ...).
memory, exporting memory allocation functions, copying data in and out, and creating reference tables and index encoding schemes to handle preserving object identities so you can call methods, etc.. it's a lot of work!