4 ms·
You can write Cloudflare Workers in WASM today. As far as I can tell from the outside, that's still "WASM-called-by-Javascript", and many of their JS optimizat
by yencabulator 5y ago
You can write Cloudflare Workers in WASM today.
As far as I can tell from the outside, that's still "WASM-called-by-Javascript", and many of their JS optimizations don't work the same way. E.g. if a Worker calls JS `fetch` and returns that `Response`, they recognize that and remove the JS from the data path; same is not true for WASM at this time.
- kentonv 5y agoI think that optimization should still work when using Wasm, unless the Wasm code does something silly like manually pump the stream (read from one, write to the other), but I think you'd have to go out of your way to do that, and anyway the same is true of pure-JavaScript code.
- yencabulator 5y agoOoh, that is great news. I've been itching to write a "proxy thing" in Rust instead of JS.