3 ms·
> Does anyone have any good intro resources for WebAssembly for noobs? Wasm proper isn't really a technology for noobs. This is like asking "Does anyone have
by ajross 7y ago
> Does anyone have any good intro resources for WebAssembly for noobs?
Wasm proper isn't really a technology for noobs. This is like asking "Does anyone have an introduction to x86_64 machine code, the ELF linker spec and the SysV ABI for noobs?". It's sort of the wrong part of the problem. What you want in that case is "C programming on linux for noobs".
So try googling for "emscripten tutorial" or (if you swing closer to rust) "wasm-bindgen tutorial". There are lots of other languages with wasm targets too, but quality tends to vary a lot.
But really IMHO the reason to use wasm isn't performance. Javascript interpreters are REALLY good these days for routine code. You use wasm when you need to target a big codebase in some other language to a browser, either because it's already written or because the problem area for the code isn't well suited to JS.
- duxup 7y agoThat sounds like the use case would be to insert some WASM component (that is a big heavy application / operation) into traditional web application framework as needed. Less so an entire overhaul of web applications as it is a powerful tool to be deployed for things we don't do in the browser now because there is no way to / it would be a bear to do in JavaScript due to ... JavaScript being JavaScript ;) Of course the amount of WASM to traditional JS or anything else could vary from application to application. Granted we're predicting the future here so obviously it could be off.
- ajross 7y agoReally the only available use case is inserting a wasm component into a traditional web application framework. Wasm code can only be loaded from JS, it can only be invoked from JS, and it's only way to affecting the world outside the VM is to call functions in JS that are going to do something to a user-visible DOM. This is all still traditional web development. It's just a way to target other runtimes to a sandbox in the same environment.
- voxic11 7y agoActually with the WebAssembly System Interface you can interface WebAssembly with any platform, it doesn't need to be a javascript vm. https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webassembly-system-interface/ https://hacks.mozilla.org/2019/03/standardizing-wasi-a-webas...
- krapp 7y ago>Wasm code can only be loaded from JS, it can only be invoked from JS, and it's only way to affecting the world outside the VM is to call functions in JS that are going to do something to a user-visible DOM. Incorrect. WASM was designed from the beginning to be run both on and off the web[0], and native clients already exist[1]. [0]https://webassembly.org/docs/non-web/ https://webassembly.org/docs/non-web/ [1]https://github.com/mbasso/awesome-wasm#non-web-embeddings https://github.com/mbasso/awesome-wasm#non-web-embeddings
- StreamBright 7y ago> If you can't explain it simply, you don't understand it well enough. Albert Einstein