Hacker News new | ask | show | jobs
by qw3rty01 1414 days ago
I'm not sure if there's a JS shim or not, but rust has been a supported language for a long time with that workflow: https://developers.cloudflare.com/workers/tutorials/hello-wo...
1 comments

There's a shim there, yeah (worker.js) :/
Yeah, that's kind of cheating... it runs Rust after compiling it to WASM and running that inside a JS runtime! Anyone thinking of using that should definitely consider just using WASI instead as Rust, as Zig, can compile to WASM/WASI (for those who don't know, WASI is like a POSIX for WASM, so WASM-compiled programs have access to a POSIX-like API, and therefore don't depend on the Web APIs like the Rust-compiled-to-worker solution does).
"Anyone thinking of using that should definitely consider just using WASI"

As far as I know, CFW heavily leans on V8 isolates for scaling.

Why reinvent the wheel?