5/20/2026 at 2:35:10 PM
> asm.js was Mozilla’s response to the question posed by NaCl and PNaCl: how can the web run code at native speeds?Had it been today, Chrome would have just pushed NaCl and PNaCl no matter what, and then everyone would complain why Safari and Firefox aren't keeping up with "Web" standards.
by pjmlp
5/20/2026 at 2:58:39 PM
I still maintain the notion we're in the wrong timeline, one where PNaCl died and instead of a worthy, timely successor we end up being boiled alive in a soup of Electron apps.I really thought, for a time, that we'd be doing everything in the browser. And in a way that's increasingly true, but it all just feels worse than ever. I like WASM and I want to like WASM but the rate of maturity within the ecosystem is incredibly abysmal.
What's worse is that we should all be running our untrustworthy AI tools and their outputs in precisely such a sandbox, and companies are selling the reverse: hosted sandboxes, hosted JS-based VMs.
I guess that was always the problem: there was never any money in a client-side sandbox.
by xyzzy_plugh
5/21/2026 at 5:27:15 AM
I've been using the FileSystems API a lot lately.It gives a sandboxed directory on the local computer you can read and write to (user decides what rights you get). It's what the web version of VS Code uses to edit local files.
It's wonderful. Suddenly you can blend local and remote systems together the way they should operate, without having to have local apps with god-knows-what rights.
It's not implemented in Firefox. I understand it is a risky API, but wow it makes a huge difference to what is possible.
For example, I did this for a recent Kaggle comp: https://github.com/nlothian/gemma-data-agent
It runs Gemma E4B in the browser, and Python (Pyodide) and SQL (DuckDB) in WASM.
You can give it a directory with some CSVs, tell it to load them and then it can run analysis on them.
The whole Web platform is great - I just wish I could say it runs in Firefox too.
by nl
5/20/2026 at 5:50:44 PM
I wish we had another alternate timeline."Our submission is in TALx86, a strongly typed functional language that encourages an explicit continuation-passing style and supports mutually recursive modules. We were encouraged to use this language when we learned that the competition would allow us to run our program on an interpreter implemented in hardware. We are grateful to the Intel Corporation for developing this interpreter."
by projektfu
5/20/2026 at 11:48:09 PM
Typed Assembly Language—fascinating. But since the software is "All rights reserved," I don't know if it can be used beyond personal use.by cylinder714
5/21/2026 at 12:04:07 AM
True, it was a dead end perhaps.by projektfu
5/21/2026 at 1:52:07 AM
Isn't this approximately just wasm?by nextaccountic
5/21/2026 at 11:06:20 AM
Is there hardware that executes WASM directly?by projektfu
5/20/2026 at 10:32:11 PM
I’ve found canvas + WebAssembly works great together!Here’s an example of Sudoku running in WebAssembly (it was vibe coded in Zig) and then rendered to canvas. The interface between the wasm module and the browser is function calls for keyboard and mouse events, and then another that renders to a pixel buffer to copy to the canvas.
And this approach also works for simple forms, such as a URL input that gets turned into a QR code. Again the interface is simple, here converted a URL into SVG markup. As you type in the input we call the WebAssembly render function again.
by burntcaramel
5/20/2026 at 11:23:47 PM
The sudoku example has something massively wrong with it's performance. Latency is over a second per click and it halts after a few clicks.The QR example works fine though
by spartanatreyu
5/21/2026 at 5:40:37 PM
Thanks, I had shipped a bug in the event system. The performance should be much improved now.by burntcaramel
5/20/2026 at 11:06:49 PM
Do you really think this "works great"?I'm using a brand-new MacBook Pro with a high-end M5 processor, and this site is extremely unresponsive for me. Huge latency between clicking and getting feedback.
It also breaks accessibility.
The QR code use case seems far more reasonable to me, you're generating a static image.
by dmazzoni
5/21/2026 at 5:46:42 PM
It definitely wasn’t “working great”, I’ve now fixed a bug in the event system that was causing loops. The performance should be improved now.Yes, accessibility is a key concern of mine, I’m keen to explore html-in-canvas as a way to have an accessibility tree combined with a rendered interaction.
I’m personally at a stage where React and CSS have pushed to DOM to extremes of complexity and difficultly in optimization that I desire simpler ARIA-based HTML combined with custom rendering. I’m hopeful that it will be easier to test, lighter for users, and faster for everyone.
by burntcaramel
5/21/2026 at 8:24:46 AM
Try a WebAssembly implementation of solitaire: https://solitaire.xaml.live/by breve
5/20/2026 at 3:56:41 PM
I do understand why NaCL and PNaCL are undesirable and why wasm is much better, but as a student the NaCL ssh app had saved my computer science homeworks more than once, and this is something that still doesn't have an alternative although I rarely would need it nowadays.by alex7o
5/20/2026 at 11:02:42 PM
https://ssheasy.com/https://www.google.com/search?q=wasm+ssh+client
...the future is here!
by ramses0
5/20/2026 at 11:31:50 PM
I think the whole NaCL thing was able to do the ssh directly from the browser without any tunneling, but maybe I am misrememberingby alex7o
5/21/2026 at 8:19:12 AM
> I like WASM and I want to like WASM but the rate of maturity within the ecosystem is incredibly abysmal.The C# toolchain for WebAssembly is pretty good. You can do a lot with Avalonia and Uno:
Here's a C# clone of Visual Basic compiled to WebAssembly:
by breve
5/20/2026 at 6:02:44 PM
What do you feel is immature in the WASM ecosystem right now?by kettlecorn
5/20/2026 at 7:05:30 PM
Kindly give us performant access to the DOM, pretty-please! WITHOUT any JS glue code.WASM is called WEB assembly but it can't access the Web API's without paying tax to the JS tyrant in between.
by lenkite
5/20/2026 at 9:31:24 PM
> Kindly give us performant access to the DOM, pretty-please! WITHOUT any JS glue code.https://hacks.mozilla.org/2026/02/making-webassembly-a-first...
by JoshTriplett
5/20/2026 at 7:25:37 PM
WASM standalone runtimes are mostly fine, but WASM in the browser is not great. No direct access to any web APIs (this often really hurts when shuffling data to/from WebGPU). Multithreading via WebWorkers is a complete pain to setup. No zero-copy APIs for streaming data in/out. Little paper cuts, but they all add up...by swiftcoder
5/20/2026 at 7:17:21 PM
Memory management is pain. If you want to optimize, you're forced to 4k pages. Runtimes are fragmented. Wasi is a mess. Async and threading is awkward. Whenever you need to integrate with hardware you need platform specific adapters.In practice, whenever you need more than a singlethreaded app with http/serial port, the "run everywhere" breaks.
Don't get me wrong I love WASM but we're not there yet
by po1nt
5/20/2026 at 6:15:12 PM
Not the previous poster, but immatures: Needing to compile down to one enormous program, with no possible code sharing. The async story is not good.Wasm components & wasi have a lot of promise here. Until now though browsers have been ignoring all this; Firefox just started taking a more active interest. https://hacks.mozilla.org/2026/02/making-webassembly-a-first...
by jauntywundrkind
5/21/2026 at 9:55:43 AM
Probably an unpopular opinion, but IMHO the WASM Component Model is an entirely overengineered boondoggle that has no place in browsers.It's trivial to create small statically linked WASM programs in the "a few dozen kilobytes" range with the right programming language (like C).
"Code sharing" via dynamic linking also works, but it has the same downsides as dynamic linking on native platforms (basically that DLL interfaces represent an optimization barrier): https://emscripten.org/docs/compiling/Dynamic-Linking.html
by flohofwoe
5/20/2026 at 9:00:32 PM
PNaCl was a terrible idea. It was as bad of an idea as shipping the raw sqlite interface in the browser.I feel like some of the Google-sourced standards are the laziest, least-webby ones out there. There are some good ones that come from the Chrome team, but man the real stinkers are _always_ a lazy Google engineer trying to ship a half-baked clone of something native in the browser because they need it for something or other internally.
by mmastrac
5/21/2026 at 11:00:13 AM
i care about it more than money, here's my take on a client-side `sandbox`: https://github.com/smol-machines/smolvmit's a lightweight vm because i see sandboxing as a feature of vm's.
by binsquare
5/20/2026 at 4:27:27 PM
Its like natural selection, maybe not the best traits win overall but one that is the most popular choice because everyone is a webdev.by hoppp
5/20/2026 at 3:12:22 PM
What are the key differences between PNaCl and WASM?by tardedmeme
5/20/2026 at 7:42:22 PM
One of the big issues with NaCl is that the API it used wasn't standardized at all and there was only a single implementation. You could pick a random function and ask "hey, what happens if you pass in some slightly weird arguments?" and there was no answer beyond "whatever Chrome does". With enough work, maybe that could have been overcome while preserving backwards compatibility, but there were lots of random functions in there because somebody or other had found it useful. WASM was built from the ground up with a standards process and multiple implementations.by mccr8
5/20/2026 at 3:21:03 PM
There were 3 systems, all with interesting differences.The original NaCl was a 'validated subset' of native CPU machine code (e.g. actual x86 machine code with some instructions and instruction sequences disallowed which would allow to escape the sandbox).
The next iteration was P(ortable)-NaCl which replaced the native machine code with a subset of LLVM bitcode, which was then compiled at load time. Unfortunately with this step NaCl lost most of its advantages. Startup time was atrocious because it was basically the second half of the LLVM compilation pipeline (from LLVM-IR to machine code). LLVM-IR also isn't actually great as CPU-agnostic bytecode.
WASM was designed from the ground up as CPU agnostic bytecode that's also much easier and faster to validate.
The only major advantage of PNaCl vs early WASM was that PNaCl supported shared-memory threading right from the start (this is still knee-capped in WASM because of the COOP/COEP response header requirement).
...apart from Emscripten => asm.js => WASM, and Google's NaCl/PNaCl there was also a system by Adobe (Flascc/Alchemy(?) I forgot all the names this went through) to compile C and C++ code into Adobe Flash bytecode.
I have an ancient blogpost from 2012 which compares the three (and where I have been flabbergasted by how well Emscripten actually worked - and this was even before asm.js - the linked demo is unfortunately no longer up):
by flohofwoe
5/20/2026 at 6:44:16 PM
> AlchemyYep, that's the name. There was a brief period in late 2000s when Adobe was pushing hard to make Flash embedded into web ecosystem. They made Air as a way to package Web or Flash code into a desktop app. Essentially it was Electron-before-Electron. Alchemy was a part of this grand plan to be able to integrate existing native libraries with Flash code. The plan was like you said to compile to Flash bytecode, and AFAIK it never went further than a tech demo.
This whole ecosystem turned into a slow train-wreck over approximately 5-year period. Adobe really saw themselves as future stewards of web technology. They donated their ActionScript VM and a JIT to Mozilla and hoped that Firefox would become the first browser with fast JavaScript engine. Google developed Chrome and V8 in secret and managed to release their fast browser early. Microsoft and Yahoo sabotaged adoption of ActionScript dialect as at the next JavaScript. And at the same time Apple went fully anti-plugins, and with the rise of iPhone both Flash and silverlight died off.
Years later Java folks tried to build their own version of Alchemy as part of GraalVM. The project was called Sulong and was using Graal to execute and JIT LLMV bitcode. TruffleRuby was supposed to be a primary early beneficiary to be able to compile and run Ruby native extensions. This was during the period of a race between several JIT solutions in hopes to become "the next Ruby", and Truffle team (along with IBM's OMR) lost the race first to MJIT and then to YJIT. Graal itself seems to loosing steam, because their multi-language VM never got enough adoption among Java, Node, or Ruby people, and the VM itself tended to use too much RAM in era when RAM became premium in the cloud.
by andrewl-hn
5/21/2026 at 9:43:48 AM
Graal was never designed as OpenJDK replacement, it is the evolution of MaximeVM, and their main customers, meaning who pays the team salaries are the Oracle database and cloud teams.In that regard they are doing pretty well.
Plus all the folks that never paid for ExcelsiorJET, JRockit, PTC, Aicas, and many others of which only PTC and Aicas survive, now have in Graal their gratis AOT compiler.
Alongside OpenJ9 (which is more like what Leyden is trying to be), and the one on the box shipped alongside ART.
Ruby on top of JVM has a few interwined stories since the days Sun embraced it on Netbeans, and it suffers from the same issues as PyPy regarding adoption, it suffices not to be 100% compatible with whatever crazy extensions written in C exist out there.
Microsoft was probably more clever giving up on IronPython and IronRuby, and keeping the DLR infrastructure.
by pjmlp
5/21/2026 at 4:28:44 PM
In my experience JRuby is way more viable than Jython ever was, one because Ruby native modules were more often thin wrappers, two because Ruby has sorta-standard in form of test suite (which AFAIK evolved from one that was necessary for ISO Ruby effort), and established somewhat case of using different implementations..And C extensions never got as crazy as in python, and some major ones either made Java backends or switched from MRI embedding to FFI
by p_l
5/20/2026 at 4:42:28 PM
> (Flascc/Alchemy(?) I forgot all the names this went through)Crossbridge was its third and most recent name.
Pepper.js is another interesting project from around this time that didn't pan out.
by Randomno
5/20/2026 at 4:49:16 PM
Wasn't pepper the P in PNaCl?by Yoric
5/20/2026 at 5:00:18 PM
The P in PNaCl is Portable.Pepper was a pun on Native Client (since NaCl = salt). Pepper Plugin API (PPAPI) was Google's more secure version of NPAPI (Netscape Plugin API). Flash Player was essentially the only thing using NPAPI/PPAPI by the end of its life.
by Randomno
5/20/2026 at 5:22:49 PM
The most common plugins were Flash, Silverlight, Adobe Reader, and the Java applet plugin, and I think all of those were in mildly common use when plugins were on their last legs.by jcranmer
5/20/2026 at 8:18:53 PM
Now you can have all of them running on top of WebAssembly, companies even pay for support.by pjmlp
5/20/2026 at 3:35:13 PM
> The only major advantage of PNaCl vs early WASM was that PNaCl supported shared-memory threading right from the start (this is still knee-capped in WASM because of the COOP/COEP response header requirement).Presumably that is because PNaCl predated spectre (?)
by bawolff
5/20/2026 at 3:40:57 PM
Indeed, NaCl and PNaCl would have been hit by Meltdown/Spectre at least as badly as SharedArrayBuffer.by flohofwoe
5/20/2026 at 6:48:44 PM
I remember early during the Wasm design process we were openly speculating whether people would eventually figure out how to do stuff like Rowhammer from raw Javascript. My bet was on Yes, but I don't remember if any of my teammates said No. I think we all knew the writing was on the wall by then.by kg
5/20/2026 at 6:06:48 PM
> The original NaCl was a 'validated subset' of native CPU machine code (e.g. actual x86 machine code with some instructions and instruction sequences disallowed which would allow to escape the sandbox).Out of curiosity, does that mean that NaCL (without P) only ran on x86? Or were there different subsets for different architectures?
by xg15
5/20/2026 at 7:25:54 PM
You could compile NaCL code for x86_64, aarch64, and aarch32 as well. Chrome apps has a system similar to mobile apps where you would upload an app with all binaries and users would get the one for their system architecture.by wffurr
5/20/2026 at 10:25:03 PM
Ah, that makes sense. So users were effectively cross-compiling the NaCL binaries for multiple architectures.by xg15
5/20/2026 at 7:04:33 PM
I think the plan was to JIT x86 to other architectures.by wmf
5/20/2026 at 8:01:14 PM
Heh, emscripten. I remember running the Unreal engine in the browser with that. Quite impressive indeed.by jorvi
5/20/2026 at 6:17:06 PM
> we should all be running our untrustworthy AI tools and their outputs in precisely such a sandboxThe DevOps infrastructure Kubernetes runbook AI inference router API people (DIK-AROUnders for short) always want an abstract technical solution that increases both their budget and their distance from the end user's actual application. Like the more money they get to dick around with meaningless technical cathedrals, the better. They're only bent out of shape that they couldn't parlay that into a sweet crypto scheme. In the real world, the line between what users actually want and what DIK-AROUnders call inauthentic activity is quite blurred.
To me, the fact that AI agents can browse websites and make payments and read my email and pretend to be me or other people is a huge part of their value proposition. People want to get out of the sandbox! There are many meanings to the words security and privacy.
by doctorpangloss
5/21/2026 at 8:27:52 PM
While NaCL and Silverlight were both alternatives to Flash...All these people in comments beating their chests about how WebAssembly is totally good for everything you can imagine, and there's not a single browser game that is not a tic-tac-toe level.
by crabbone
5/20/2026 at 3:18:30 PM
I mean that's still basically what they tried to do at the time. They were trying to get them through web standards committees and everything.IIRC a big reason it didn't end up working was because NaCl was such a "big" technology and asm.js such a "small" one that asm.js was able to reach production-ready first despite starting work several years later.
by lmkg
5/20/2026 at 7:51:18 PM
The cute thing about asm.js is that it was fully backwards compatible with the web: it was just a lot slower without dedicated support. So Epic or whomever could put out a demo that would run just fine in Chrome, but the performance was a lot worse than Firefox which had a dedicated compilation pipeline, so it made Chrome look bad.by mccr8
5/20/2026 at 9:33:28 PM
Exactly. "You can't not support it; you can only be slow."by JoshTriplett
5/20/2026 at 3:46:17 PM
The big difference was that they lacked the market share they enjoy nowadays, with their forks and Electron crap.by pjmlp
5/21/2026 at 4:35:59 PM
The way I remember it, NaCl and PNaCl ended up nowhere not because big, but because Mozilla, then with big influence on standards, declared them not web enough for the crime of not being JavaScript and pushed against any addition of it into Gecko in any form and promoted "JavaScript is all you need" including an early demo of decoding video in JS - which I recall disgusted me because I somehow knew it would take away various technical issues preventing proprietary encoding from closing down web videos.Funnily enough, NaCl had its origins in Mozilla extension, with old versions IIRC mentioning lineage starting in Google Gears extension for Firefox
by p_l
5/21/2026 at 1:01:21 AM
That's not how I remember it: it was an experiment that was useful at the time but didn't work out. It was useful internally to sandbox Flash player, but the limitations of the LLVM based approach were soon evident to everyone involved.by indolering
5/20/2026 at 4:37:09 PM
You mean Chrome would have pushed it, Apple would have filibustered it by refusing to comment (via lack of investment in the WebKit team), and then gullible folks on the internet would defer to them.(I will note that Apple seems to have upped WebKit investment this decade since their regulatory problems started in earnest - so it's possible this would end differently today)
by benced
5/21/2026 at 12:29:14 AM
People complain when there are no highly compatible alternatives to something that would be useful to have on the web platform. Asm.js and then Wasm were those alternatives. That's why they didn't complain then but do complain now about things that Safari won't do because it would hurt the App Store. Happily, the EU is now at least trying to whip Apple into shape.by lern_too_spel