3 ms·
I love TypeScript! Forgive my ignorance but what purpose does WebAssembly have in this context? I assumed that stuff like ASM was really for other non-native ap
by Fifer82 9y ago
I love TypeScript! Forgive my ignorance but what purpose does WebAssembly have in this context? I assumed that stuff like ASM was really for other non-native applications. Say for example a C++ game which then can run in the browser or stuff like that.
So as a TypeScript guy with AssemblyScript at my fingertips, what doors does that open for me?
I occasionally have to make HTML5 games in Canvas. Is this the kind of path where WebAssembly could be beneficial?
One day will there simply be an end build step to turn everything into web assembly or is it never intended for use with the DOM?
- singularity2001 9y ago>> Is this the kind of path where WebAssembly could be beneficial? Yes but not exclusively. Quoth http://webassembly.org/docs/use-cases/ http://webassembly.org/docs/use-cases/ for use cases: Image / video editing. Games. Peer-to-peer applications. Music applications (streaming, caching). Image recognition. Live video augmentation (e.g. putting hats on people’s heads). VR and augmented reality (very low latency). CAD applications. Scientific visualization and simulation. Interactive educational software, and news articles. Platform simulation / emulation (ARC, DOSBox, QEMU, MAME, …). Language interpreters and virtual machines. POSIX user-space environment, allowing porting of existing POSIX applications. Developer tooling (editors, compilers, debuggers, …). Remote desktop. VPN. Encryption. Local web server. Common NPAPI users, within the web’s security model and APIs. Fat client for enterprise applications (e.g. databases).
- kartan 9y ago> Forgive my ignorance but what purpose does WebAssembly have in this context? Suppose a future web that is language agnostic. Your browser doesn't understand ECMAScript 2015, nor 2016, nor VBScript. It has an extremely optimized and fast virtual machine that works with WebAssembly. This reduces complexity. It brings diversity to the web ecosystem, you can use any language that compiles to WebAssembly. There are no second class languages on the web. But to build that future we need to create the tools. You can already use clang to compile many languages to WebAssembly, but ECMAScript nor Typescript are on that list. WebAssembly should be able to interact with the DOM. But also to more low level APIS like access to USB devices. (https://developers.google.com/web/updates/2016/03/access-usb-devices-on-the-web https://developers.google.com/web/updates/2016/03/access-usb...) Many things can go wrong, or can be moved in other directions. But the big success of the Java Virtual Machine shows the power of compile once run everywhere approach. > Say for example a C++ game which then can run in the browser or stuff like that. That's already possible using EmScriptem (http://kripken.github.io/emscripten-site/ http://kripken.github.io/emscripten-site/). Game companies like King already use the same C++ code base for their mobile games and browser games. The problem is performance. With WebAssembly it will get more simple and faster.
- pjmlp 9y agoRegarding the JVM I would also add, that it was common approach on mainframe architectures to use bytecodes + microcoded CPUs, with IBM and Unisys mainframes being the best examples still in production. PCs and mobile OSes have been catching up with those designs.