lol, this feels surreal.
This seems like there could be even more stuff automated.
Because Rust is statically typed, a rust-loader could "overload" import() so it initialises and extracts the exported/non-mangled function signatures and create the JS equivalents automatically.
const {add} = await import("./main.rs");
add(2,2)