title: Making WebAssembly a first-class language on the Web
author: u/ketralnis
contenttype: redditpost
publication: r/programming
published: 2026-02-26T17:46:54+00:00
sourceurl: https://www.reddit.com/r/programming/comments/1rfgzit/makingwebassemblyafirstclasslanguageon_the/
word_count: 506
Link: https://hacks.mozilla.org/2026/02/making-webassembly-a-first-class-language-on-the-web/
Score: 340 | Comments: 65 | Subreddit: r/programming
Top Comments
u/Adohi-Tehga (139 pts):
I am very excited that this is being considered. When I first heard that WebAssembly was being developed I was overjoyed: I could write code for browsers to execute in Rust or C++, instead of having to muck around with JS and all of its type-related madness. Then WebAssembly was actually shipped in browsers and I discovered that you still have to use JS if you want to interact with browser APIs in any meaningful way.
I fully appreciate that developing an entirely new language for the web is a monumental task, and that a compiled language makes sense to target high-performance scenarios, but for most of us plebs writing run-of-the-mill websites this new proposal is what we have wanted all along. The fact I could (if I was clever enough) write real time ray-traced games that run in the browser is mind-blowing, but it's not something that I would ever get to do in my day job. All I want is to be able to write functions that interact with the dom AND guarantee that the arguments passed to them are actually going to be numbers and not null, an array of objects, or a string that the interpreter will try very hard to assign a numeric value to, because it's only trying to help and having some value is better than throwing an error, no?
u/karuna_murti (37 pts):
Wow it's coming. WebAPI and direct DOM access, been waiting for this for a long time since I published my Rust book.
u/yoden (22 pts):
It's very WASM that this is a post theorizing how potential future usage of this feature might one day actually allow something simulating the direct usage of WASM. Seems like they'll do almost anything except actually let WASM touch the web stack.
u/dragonnnnnnnnnn (15 pts):
What is the state of memory allocation? Can it finally shrink/release allocated memory to the system?
Without that it will be never "first class".
u/lood9phee2Ri (52 pts):
JavaScript is the original scripting language of the Web
Nah that was TCL (tkWWW etc.). Netscape didn't even exist yet (company formed Apr 1994) when in-browser TCL scripting was becoming a thing.
But TCL lacked that sweet sweet vendor lock-in, Netscape wanted their own proprietary language not an openly licensed thing anyone could use like TCL. They're often painted as underdogs relative to Microsoft (and they were), but they were closed-sourcers. Microsoft cloned JavaScript as JScript anyway (while also pushing their own proprietary VBScript for scripting, shudder). The open sourcing of Mozilla and open standard ECMAScript was all later developments. Not negative ones or something, but JavaScript is at best the second scripting language of the Web.
The HTML 4.0 spec was still giving its <SCRIPT type="..."> examples in all 3 once-common in-browser scripting languages i.e. TCL, JavaScript and VBScript in 1997.
https://www.w3.org/TR/REC-html40-971218/appendix/notes.html#notes-specifying-data
u/shgysk8zer0 (8 pts):
Please don't make this just another module in scripts and imports. It needs a different <script type="wasm"> and import('... ', { with: { type: 'wasm' }). Then you'd at least get to use feature detection via HTMLScriptElement.supports() and the implant distinction between ES Modules and WASM.
u/BusEquivalent9605 (5 pts):
WASM 4 life 🙌🎉