3 ms·
There is clearly some sort of mapping available to a JavaScript FFI for doing I/O, as both the Unreal engine and Unity have been ported to WebAssembly. If you
by colordrops 10y ago
There is clearly some sort of mapping available to a JavaScript FFI for doing I/O, as both the Unreal engine and Unity have been ported to WebAssembly. If you can run a video game engine in the browser you can run anything. I believe there are proposals in place as well to add opcodes to directly interface with browser capabilities rather than going through a JS FFI.
- leeoniya 10y ago> If you can run a video game engine in the browser you can run anything no
- colordrops 10y agoenlighten us
- leeoniya 10y agook, assuming your request is not sarcastic: - operating systems - hardware drivers - a networking stack - trading algorithms - fighter jet firmware - ultra low latency DSP - processing data from LHC collisions or imaging satellites. - etc - etc - etc just because webgl enables fast gpu processing (by basically writing a small subset of C that is shader code) doesnt now mean the web platform can be used for evetything.
- colordrops 10y agoThe implication was applications. But even then, everything on your list is emphatically not true: - operating systems Ironically Linux was one of the first things to ever be compiled to run in the browser using empscripten. - hardware drivers Linux doesn't run without hardware drivers. In this case, the hardware drivers were wrapping JS FFIs. - a networking stack Yes you can. - trading algorithms Why not? - fighter jet firmware It's not a fighter jet, but the SpaceX Dragon 2 space capsule's UI is built using Chromium. - ultra low latency DSP Why not? - processing data from LHC collisions or imaging satellites. Why not?
- leeoniya 10y agowish i had more time for the multitude of your generic "why not?"s, but i don't :( any language (high or low level) that allows you to write and execute deterministic assembly or machine code can be used to implement whatever you want. whether WASM ever reaches this type of broad security-sensitive wild-west remains to be seen, but my money is on "never". wasm will certainly expand into additional areas, but they will all be security-gated and will not have unfettered, raw access to all hardware (even with some additional user-grokkable permission model), because it has to run on the web: "W"asm
- Dylan16807 10y agoThat's entirely addresed by "The implication was applications." Nobody was trying to make a claim about web assembly drivers. Just applications.
- johncolanduoni 10y agoYou can emulate a network stack and hardware drivers, but your "network stack" can't directly send packets outside of HTTP/Websockets/WebRTC/etc. and your "hardware drivers" just emulate hardware that doesn't actually exist. Trading algorithms, ultra low latency DSP, "processing data from LHC collisions or imaging satellites" are I think references to performance limitations. WebAssembly requires a fair bit of runtime checks (though some can be pawned off to the hardware if you're clever), and has a number of other quirks that hurt performance, like the fact that most languages end up needing two stacks when compiled for wasm. The issue is even clearer when you move to processing large data sets because WebAssembly only allows a 32-bit address space at the moment. Add to that the lack of concurrency or native SIMD, and it's pretty clear it is way too early to dance on the graves of native executables.
- colordrops 10y agoConcurrency and SIMD support are in the works.
- 10y ago