9 ms·
I'm admittedly inexperienced with WebAssembly, but I'm a little unclear on going beyond the basic "hello world" implementations. Is the idea to write an entire
by hughes 9y ago
I'm admittedly inexperienced with WebAssembly, but I'm a little unclear on going beyond the basic "hello world" implementations.
Is the idea to write an entire application in WebAssembly, or is it to break out parts of the application that benefit from performance improvements and potentially cross-platform code bases?
Also, how do you do things like make network requests or decode JSON in webassembly? Do you need to implement these things yourself, or pass things back to the browser to handle them, or find C libraries that do that for you?
- kodablah 9y agoCase by case situation. WASM is nothing but a spec and impl for CPU tasks. If you want to do something like networking, you call out to JS (today). If you want to decode JSON, you could call out to JS, or populate some part of the WASM-accessible mem (a byte array) and then ask WASM to operate on it. It could be a C library compiled to WASM or hand-written or in some other compile-to-WASM lang.