Live data from Hacker News

WebAssembly Playground

observablehq.com

51–60 of 99 posts

Re: WebAssembly Playground

#51

Earlier quoted context omitted.

shrug It finds its uses. It's just not that overstated. sandspiel is quite popular and is built using WASM: https://sandspiel.club/ Google Earth - https://blog.chromium.org/2019/06/webassembly-brings-google-... Ruffle (the "make Flash run safely" tool) - https://ruffle.rs/ Ableton's Learning Synths - https://learningsynths.ableton.com/ etc etc. It's just hard to tell when something is using WASM when it "just works"…

The official Windows video editor Microsoft Clipchamp[1] also extensively uses WASM for it's video export process. [1]: https://clipchamp.com/en/windows-video-editor/

Microsoft Flight Simulator also uses WASM for plugins, which allows them to run portably on both the PC and Xbox versions of the game, with sandboxing, and still get decent performance.

https://docs.flightsimulator.com/html/Programming_Tools/WASM...

It should also be future proof should they ever do a native ARM build.

Re: WebAssembly Playground

#52
Is the site working? There seem to be broken sections: a section that just says "undefined", a large section that's blank, and a section that just says "Error: process exited with code 1.".

Re: WebAssembly Playground

#53
post #18

Earlier quoted context omitted.

Not sure if WASM is there yet, but maybe the crud app can be built using a programming language that the developer prefers? Like Java, C#, Go, Rust, C++, whatever instead of JavaScript/TypeScript?

Yeah, we took a bet that writing our compiler, simulator, etc. in Rust and architecting correctly so it could compile to native and WASM would let us run native and in the browser too, and we’re pretty thrilled with how it turned out. We just shipped 1.0, but this slightly older blog post goes into the architecture a bit more: https://devblogs.microsoft.com/qsharp/introducing-the-azure-...

Have you considered an open source the parser/compiler framework that targets wasm? I suspect that dsl's and tiny languages compiled directly to wasm could be valuable.

Re: WebAssembly Playground

#54

Question from someone knew very little in this domain: what stops mass adoption of WebAssembly? A few years ago, I used a WASM demo website which can use a WASM version of ffmpeg to mux audio and video into a file (transcoding obviously wasn't practical, at least not at that time), and I was very impressed. I can see lots of potential of it. But I still haven't see much usage of it even today. (To be totally honest -…

By mass adoption, do you mean why not all existing softwares are ported to webassembly so that they can be run on browsers? Most websites are just that - "sites". Complicated softwares that _need_ to be run on the web are already leveraging WebAssembly to an extent. 1. Figma (Design tool) uses Webassembly underneath for graphics operations. 2. Zoho Writer (word processor) uses WebAssembly for leveraging ICU capabilit…

As far as I know Figma used asm.js (then WASM) from the start. I actually don't think they'd have had the success they had without it - it would have been too slow built in JS.

So in a way webasm/asm.js is already allowing whole new categories of webapps we take for granted now.

Re: WebAssembly Playground

#55

Question from someone knew very little in this domain: what stops mass adoption of WebAssembly? A few years ago, I used a WASM demo website which can use a WASM version of ffmpeg to mux audio and video into a file (transcoding obviously wasn't practical, at least not at that time), and I was very impressed. I can see lots of potential of it. But I still haven't see much usage of it even today. (To be totally honest -…

I'm developing a wasm game, and currently I am targeting WebGL2 in order to run in iOS Safari. Me (and others, I'm sure) are currently waiting for WebGPU [1] to land in Safari so it will make sense to target it. WebGPU allows for simplified porting of desktop games to the web, such as WGSL shaders [2] WebGPU will be the next big thing [3], and currently it is enabled on Chrome Windows/macOS, and can be enabled in Fir…

8MB seems high for Rust. Even the project I did [1] which was using D (with GC) ended up with an 8MB WASM. Rust's WASM target is much more exercised than D's, so I think you might need to tweak some compile options.

[1] https://github.com/speps/tt

Re: WebAssembly Playground

#56

Question from someone knew very little in this domain: what stops mass adoption of WebAssembly? A few years ago, I used a WASM demo website which can use a WASM version of ffmpeg to mux audio and video into a file (transcoding obviously wasn't practical, at least not at that time), and I was very impressed. I can see lots of potential of it. But I still haven't see much usage of it even today. (To be totally honest -…

From my perspective It's 2 primary blockers.

1. It's too damn hard to get data into and out of wasm modules. The component model is addressing this but it's sprawled out into literally rebuilding "worlds" and turning wasm modules into sort of lightweight virtual machines. I wish there was just more of a focus on getting data into and out of modules first.

2. Lack of GC which has made languages like js/python/jvm/c# unfeasible. WASM GC is just now available and hopefully ship compilers can target and build wasm modules that aren't so large in not too distant future.

Once we are past these 2 items, wasm can run free and really should become the final unit of deployment.

edit: I also suspect that like the jvm which started as a client tech, wasm will find more use on the server side, than on the client side in info/business type software.

Re: WebAssembly Playground

#57

Question from someone knew very little in this domain: what stops mass adoption of WebAssembly? A few years ago, I used a WASM demo website which can use a WASM version of ffmpeg to mux audio and video into a file (transcoding obviously wasn't practical, at least not at that time), and I was very impressed. I can see lots of potential of it. But I still haven't see much usage of it even today. (To be totally honest -…

I think it’s a few things:

- CPU features and system calls. Native code can leverage specific CPU features to gain performance. It has access to files and the network via OS system calls. Code compiled to WASM runs inside the WASM sandbox. It makes code slower. Getting data to/from the WASM code is harder.

- The WASM engine is right next to a “good enough” alternative (JS).

Re: WebAssembly Playground

#58
post #55

Earlier quoted context omitted.

I'm developing a wasm game, and currently I am targeting WebGL2 in order to run in iOS Safari. Me (and others, I'm sure) are currently waiting for WebGPU [1] to land in Safari so it will make sense to target it. WebGPU allows for simplified porting of desktop games to the web, such as WGSL shaders [2] WebGPU will be the next big thing [3], and currently it is enabled on Chrome Windows/macOS, and can be enabled in Fir…

8MB seems high for Rust. Even the project I did [1] which was using D (with GC) ended up with an 8MB WASM. Rust's WASM target is much more exercised than D's, so I think you might need to tweak some compile options. [1] https://github.com/speps/tt

Rust binaries seem to be larger than they should be, though. I believe Kobzol [1] has been making some work on that.

[1]: https://kobzol.github.io/rust/cargo/2024/01/23/making-rust-b...

Re: WebAssembly Playground

#59
post #55

Earlier quoted context omitted.

I'm developing a wasm game, and currently I am targeting WebGL2 in order to run in iOS Safari. Me (and others, I'm sure) are currently waiting for WebGPU [1] to land in Safari so it will make sense to target it. WebGPU allows for simplified porting of desktop games to the web, such as WGSL shaders [2] WebGPU will be the next big thing [3], and currently it is enabled on Chrome Windows/macOS, and can be enabled in Fir…

8MB seems high for Rust. Even the project I did [1] which was using D (with GC) ended up with an 8MB WASM. Rust's WASM target is much more exercised than D's, so I think you might need to tweak some compile options. [1] https://github.com/speps/tt

(Not op)

I agree that 8MB seems high. I can generate a 6MB binary using `--debug` with `wasm-pack` so definitely for a more complex thing I could see 8MB. I think `--release`, `codegen-units = 1`, `opt-level = 3/z` are the three biggest things that affect binary size for me.

I don't think 8MB is that big a deal for a web game though. Like how large are the images? If you're going to dynamically load in like 50+ MB of assets then having an initial game of 8 MB is the small pole in the tent. I have my stuff setup as a PWA so once everything has been downloaded it takes 0 MB on the wire to open a second time; you could set-up the game as 2 binaries; one super-small one that just basically handles an opening cinematic and a larger one that can actually play the game which is downloaded while the cinematic plays (or is cached in future opens).

Re: WebAssembly Playground

#60

Question from someone knew very little in this domain: what stops mass adoption of WebAssembly? A few years ago, I used a WASM demo website which can use a WASM version of ffmpeg to mux audio and video into a file (transcoding obviously wasn't practical, at least not at that time), and I was very impressed. I can see lots of potential of it. But I still haven't see much usage of it even today. (To be totally honest -…

By mass adoption, do you mean why not all existing softwares are ported to webassembly so that they can be run on browsers? Most websites are just that - "sites". Complicated softwares that _need_ to be run on the web are already leveraging WebAssembly to an extent. 1. Figma (Design tool) uses Webassembly underneath for graphics operations. 2. Zoho Writer (word processor) uses WebAssembly for leveraging ICU capabilit…

Is there a citation for 3?

Afaik, WASM is only used by Sheets [1].

[1]: https://2024.wasmio.tech/sessions/webassembly-at-google/

Post reply on HN