Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> You need latest Chrome with "Experimental WebAssembly" and "Experimental WebAssembly JavaScript Promise Integration (JSPI)" flags enabled!

Darn, guess I'll have to wait for stuff to land in Firefox.



At least Firefox now allows for CSS scrollbar styling, so you have that going for you which is nice.


I enabled the requested chrome:flags in Brave, but it still doesn't work. I haven't downloaded Chrome on any of my M1 Macs, and don't plan to start now.


same here, I use Chromium but it's the latest version and I enabled those flags... website still does not work


I tried turning them on in Canary, but I still couldn't get it to work.


I tried on latest (normal) Chrome, beta and canary/nightly and enabled both options one by one and let it relaunch but still wouldn't work at all. ¯\_(ツ)_/¯

How are others getting it working?!

From someone else's comment, this one works fine: https://websd.mlc.ai/#text-to-image-generation-demo


It's working on Edge / win 11 ;)

If you can't run it, here's how the output looks with default settings https://i.imgur.com/WCQc8hO.png


How long approximately did it take you to get to state of the posted image? Any hardware specifics would be helpful to understand performance. Thanks!


It's running only a single thread, so I think the specs are a little less relevant. It takes about 80s per iteration and I ran the 4 iterations set by default, so a little less than 6 minutes.


What error message do you get?


Hold on, to run your demo does one have to click the "Load Model" button before doing anything? 'cos what I see is a form that is greyed out with the error message still at the top:

> You need latest Chrome with "Experimental WebAssembly" and "Experimental WebAssembly JavaScript Promise Integration (JSPI)" flags enabled!

Now I'm wondering whether the top message goes away once the flags are enabled?


> Hold on, to run your demo does one have to click the "Load Model" button before doing anything?

Yes. I thought it won't be good if it would download 3.5gb once you open the page.

>Now I'm wondering whether the top message goes away once the flags are enabled?

No, I haven't added any checks for that (and I'm not sure how the first one can be properly checked), so it's just an info bar. Which is, eventually, misleading.


It works on canary on M1 mac and Windows w/ an NVIDIA RTX GPU. I believe there are custom command line options that have to be passed to make it work. The MLC site has the deets that work.


You refuse to even try something on chrome?


Nah, I don't use Chrome so I don't have it installed. I'm not a web developer, so testing across different platforms isn't useful to me. I've used StableDiffusion before, so hacking around to make this demo work in my browser isn't particularly interesting either.


Yes. You don't?


I agree with the poster 100%. Im convinced any Google applications immediately suck every iota of data they possibly can at install time / first launch. It’s not worth it to me either.


What does the second flag do


Turns on an implementation of this proposal

https://github.com/WebAssembly/js-promise-integration/blob/m...


Why is it that implementing something in wasm is stalled for so long but doing it as a js feature is so fast? Anyone have insights? As an outsider it feels like wasm is being developed in an impossibly slow way.


Implementing something new in JS can be done relatively easily using a slow path, where you just write some privileged JS or C++ and then wrap it, without doing any optimizations. Then if it gets popular the vendors can optimize it at their own pace.

Implementing a new feature in WebAssembly is a bit more complex due to its execution model and security constraints. I expect it's also just the case that a lot of these new WASM features are very complex - promise integration is super nontrivial to get right, so are WebAssembly GC and SIMD.


OK, I'd believe that I guess.


JS Promises in something like their modern form were first played around with in ~2010, and it was ~2016 before browsers were shipping them natively. Good standards can take a while!


Because it basically covers what PNaCL, Java plugin, Flash plugin, Silverlight asm.js were doing.

Anything beyond those use cases it is really meh, specially given how clunky compiling and debugin WASM code tends to be.

Then we have all those startups trying to reivent bytecode executable formats in the server, as if it wasn't something that has been done every couple of years since late 1950's.


> Because it basically covers what PNaCL, Java plugin, Flash plugin, Silverlight asm.js were doing.

Right but it doesn't right now? Like you can't just write arbitrary code as you would with a Java plugin, or a PNaCL C++ plugin. Wasm is extremely difficult to use for those use cases.

> Then we have all those startups trying to reivent bytecode executable formats in the server, as if it wasn't something that has been done every couple of years since late 1950's.

Yes, because people really want this and the solutions have all been fraught with security issues historically.


What makes you think WASM isn't without flaws, just because their advocates say so?

"Everything Old is New Again: Binary Security of WebAssembly"

https://www.usenix.org/conference/usenixsecurity20/presentat...

"Swivel: Hardening WebAssembly against Spectre"

https://www.usenix.org/conference/usenixsecurity21/presentat...


I didn't say WASM is without flaws, I said the predecessors had flaws but that the premise is valuable, which is why we keep trying it over and over again.

Notably, the first paper is about exploitation of webassembly processes. That's valuable but the flaws of previous systems wasn't that the programs in those systems were exploitable but that the virtual machines were. Some of this was due to the fact that the underlying virtual machines, like the JVM, were de-facto unconstrained and the web use case attempted to add constraitns on after the fact; obviously webassembly has been designed differently.

I hope wasm sees more mitigations, but I also expect that wasm is going to be a target primarily for memory safe languages where these problems are already significantly less significant. And to reiterate, the issue was not the exploitation of programs but exploitation of the virtual machines isolation mechanisms.


I don't know for sure, but gut says the primary factor must be the ratio of devs working on JS runtimes vs WASM (over 10,000:1?)




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: