alt.hn

2/26/2026 at 4:07:56 PM

Making WebAssembly a first-class language on the Web

https://hacks.mozilla.org/2026/02/making-webassembly-a-first-class-language-on-the-web/

by mikece

2/26/2026 at 8:44:20 PM

WebAssembly is amazing, but I don't think making it a DOM controller is where the action is. What specific scenarios do you aspire to unlock and why would those scenarios lead to broader adoption?

by thesmart

2/26/2026 at 9:31:27 PM

I think it's less about unlocking new scenarios per se, and more about making existing scenarios better. If given the choice I'll generally prefer to write my code in Rust. But with native Wasm Component-based DOM bindings that same code will now run twice as fast.

by yoshuaw

2/26/2026 at 9:39:56 PM

The other side of the story here is also worth considering: native support in browsers provides a stable compile target for language toolchains. It'd be really nice if targeting the web from e.g. Kotlin, Swift, or Rust becomes just a matter of passing the right flag to the compiler.

by yoshuaw

2/26/2026 at 10:09:55 PM

providing <script type="module" src="component.wasm"></script>

and the import loader to just put .wasm in an import and get to call functions are the actual useful things in this post

component model is trash

by nilslice

2/26/2026 at 7:31:40 PM

Is `component {}` valid wit syntax? I've never seen that before

by mendyberger

2/26/2026 at 7:34:56 PM

It's proposed here: https://github.com/WebAssembly/component-model/issues/598

Basically, it's sugar for `package` and `world` in the case where you aren't actually defining a world for others to use, and just for your own use. In such a case, the package and world names are irrelevant anyway.

by bvisness