4 ms·
As someone who worked actively with webassembly for the last few years, and is about to drop a WASM based framework, here's what happened: - The ecosystem evol
by thecupisblue 9mo ago
As someone who worked actively with webassembly for the last few years, and is about to drop a WASM based framework, here's what happened:
- The ecosystem evolved fast, then slow. This caused adoption problems, especially for things such as WASI and Component model, as a lot of folks did it their own way/using 3rd party, which now meant they had to rewrite to this new thing that still isn't fully properly supported everywhere.
- The way it's "developed" means a lot of things are distributed, unsynced and have different support levels based on the engine you're using. This causes confusion among developers, especially since you have to go from reading an article, to reading a spec, to reading a github issue, then you're 3 repositories deep reading random rust code at 2 AM trying to figure out if you can rely on this stranger's fork just to try something out that should have been dead simple.
- Both of these combined can lead to even greater confusion for our LLM's, as they are trained on varied data which is by now stale, so they can often misunderstand things or look for things that aren't there anymore, just like us humans would.
- And now let's focus on the biggest and most important one IMO:
Javascript/Typescript support. That is the holy grail for any technology that wants to be a widely adopted intermediary. While it is possible, you are layering hacks on hacks and begging that the next user won't break it all. Until my users can bring whatever they're using with them, the transition isn't really worth it, and writing my own wiring for every possible combination/need is quite unnecessary. We got a step closer with Web Containers, but by that time a lot of folks already moved onto Bun.
- deleted 9mo ago[deleted]
- matt_kantor 9mo agoI don't think I understand your last point. Could you elaborate? What does "Javascript/Typescript support" mean to you (i.e. what specific features/capabilities are missing from the current engines)?
- thecupisblue 9mo agoI mean compiling JS/TS to WASM or running a JS runtime like bun inside WASM
- tennex 9mo agoJS/TS interop, sure--but what are the use cases for running a JS runtime inside WASM?
- potsandpans 9mo agoIirc, Shopify uses this to execute storefront code on the edge in a sandboxed environment. People who want to write JavaScript for backend store functionality can, and then Shopify deploys that code into containers with small IO semantics
- drysart 9mo agoI believe Shopify looked into using a JS engine in WASM for front end sandboxing but ended up using a wrapper around the Shadow Realms API instead.
- potsandpans 9mo agoIt's not front end sandboxing. It's edge function sandboxing. And they do indeed have this in prod: https://shopify.dev/docs/apps/build/functions/programming-languages/javascript-for-functions https://shopify.dev/docs/apps/build/functions/programming-la... > Shopify CLI compiles your JavaScript code using Javy, our JavaScript-to-WebAssembly toolchain. I've actually used Javy. Kind of interesting: https://github.com/bytecodealliance/javy https://github.com/bytecodealliance/javy.