Hacker News new | ask | show | jobs
by yencabulator 1526 days 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.

1 comments

I 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.
Ooh, that is great news. I've been itching to write a "proxy thing" in Rust instead of JS.