4 ms·
for 1) WASI [0][1] makes it nicer and acts sort of like a FFI for 2) there are reference types, which allow wasm to receive opaque objects similarly to how use
by afiori 4y ago
for 1) WASI [0][1] makes it nicer and acts sort of like a FFI
for 2) there are reference types, which allow wasm to receive opaque objects similarly to how userland processes receive handles from the kernel. In this way you could pass an object to wasm and let it call host functions to modify it.
If you want to have the same datatype both in wasm and in the host you simply a compiler that supports it.
[0] https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/ https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webas...
[1] https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-overview.md https://github.com/bytecodealliance/wasmtime/blob/main/docs/...