Making WebAssembly a first-class language on the Web
hacks.mozilla.org
hacks.mozilla.org
WebAssembly Components aren't nearly enough to accomplish what this article offers to accomplish. Even once components are a thing, you'd then have to restandardize the entire Web API in their new IDL, WIT.
The WebIDL specifications have taken decades to standardize. It requires Apple, Mozilla, Google, and Microsoft to agree on everything. Getting all of them to agree to restandardize on a new IDL is not going to happen this decade.
I've actually tried to do that the past and got pretty far. https://github.com/wasi-gfx/webidl2wit
And here's the generated wit https://github.com/mendyberger/brow
Why not? I feel like people have gotten so used to the limitations of WebAssembly today that they've internalized JS as the only answer. But I don't really like JS, and would love to build web apps in other languages, and I totally would if it wasn't a huge pain (and slower too!)
Modern languages come with lots of interesting features like better dev ex, null safety, etc. Js is a fine language, but there are other languages that bring unique advantages, the web shouldn't block developers from using better tools. The web is best off when developers have freedom.
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.
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