3 ms·
Wait, how so? WASM isn't an interface or a wrapper, it's a language/format. Having trouble understanding what you mean by this, unless you're arguing that the
by danShumway 4y ago
Wait, how so?
WASM isn't an interface or a wrapper, it's a language/format. Having trouble understanding what you mean by this, unless you're arguing that the WASM VM itself is the FFI?
- lucideer 4y agoI can kinda see what they mean (albeit it's somewhat of a stretch). WASM "embeds" modules within the JS runtime, in a similar way that traditional FFI "embeds" native bindings compiled separately & externally. It's still quite different insofar as the VM is a part of the runtime, but there are vague parallels. For me though, the practical problems related to runtime env that one encounters with traditional ffi bindings calling dynamically linked native libraries are rarely present with a WASM library, as the support within the runtime is explicit (the only real exception here is architecture, which is always an issue regardless).
- pjmlp 4y agoIt is FFI from JavaScript point of view, a way to call multiple native languages from JavaScript, requires import and export definitions, a wasm file is no different than a .o, .a, .obj, .lib, other than not using instructions of a real CPU on the market.
- danShumway 4y agoI can sort of see this, in the sense that the style of code I'm writing when I use WASM is similar to the style of code when calling into an FFI. I think the implications of that code are different, but yeah, I see your point and I think it's fairly reasonable.