3 ms·
Can someone explain a concrete use case for web assembly? Are there projects out there using web assembly in production? What kind of application needs more per
by jakobegger 7y ago
Can someone explain a concrete use case for web assembly? Are there projects out there using web assembly in production? What kind of application needs more performance than Javascript can offer, but doesn't need full native performance?
- jacknews 7y agoI think it's more a case of wasm being a more natural target for compilers, meaning you can write or port applications in other languages to the web without the much-worse performance (and size) implications of compiling to interpreted javascript.
- aldanor 7y agoYou can, for instance, run Python in your browser by compiling RustPython to WASM
- dakom 7y agogamedev comes to mind, where performance isn't only about raw power but also avoiding garbage-collecting hiccups which are unavoidable in JS
- MikusR 7y agoBeta of Google Earth is Wasm.
- josalhor 7y agoUnity 3D targets Web Assembly now for the web, which makes much more sense than JavaScript, even if asm
- DonHopkins 7y agoYes, Unity3D's WebAssembly back end is a very widely used, non-trivial, practical, and successful example.
- sp332 7y agoThe Internet Archive has a ton of in-browser emulators that can boot many old computers and arcade cabinets in the browser. https://archive.org/details/msdos_Oregon_Trail_The_1990 https://archive.org/details/msdos_Oregon_Trail_The_1990 Not all of these will boot, but most will. https://archive.org/details/softwarelibrary https://archive.org/details/softwarelibrary & https://archive.org/details/internetarcade https://archive.org/details/internetarcade
- GeneralMaximus 7y agoFigma (https://www.figma.com/ https://www.figma.com/) is a design tool that runs in the browser and makes heavy use of WASM. It's definitely slower than using a native app like Sketch, but not slow enough to be completely impractical. A few design people I work with here in India have switched to Figma from Sketch, and they seem very pleased with the results. I can see WASM becoming useful for enabling apps that do real-time audio/video/image processing in the browser. Games are another obvious use case. Maybe one day I'll be able to run an Ableton-lite right in the browser.
- throwawaywindev 7y agoEveryone likes Figma because of its real time collaboration. The performance is terrible but you put up with it because of the features.
- kristiandupont 7y agoIn addition to the examples given, I offer the opinion that using the same language for front- and backend is nice. I currently achieve this with JS, but it would be nice to be able to do the same with, say, Rust.
- snek 7y ago> Are there projects out there using web assembly in production? pspdfkit, unity, google earth, and figma spring to mind. Obviously more stuff is using it, but it isn't like there's a big index of sites using wasm. > What kind of application needs more performance than Javascript can offer, but doesn't need full native performance? Wasm and JS can achieve equal performance in modern browser engines (and note that in engines like v8, there are operations that can be reduced such that they compete with output from gcc and clang). The thing that wasm is designed to do is make that performance predictable. Optimizing JS requires a lot of guesswork which can end up incorrect, while wasm doesn't require any guesswork because it is strongly typed and uses a regular bytecode. Right now what is holding wasm back is coming up with all the best ways to reduce it to the machine code of the specific platform, and ways to reduce the performance hits of security checks wasm has. For example, v8 recently sped up wasm memory access by ~30% by getting rid of bounds checks and using mmap + sigsegv to detect out of bounds access.