3 ms·
So is this still converting the Rust code to Web Assembly (just doing it in a more developer friendly way)? Or is this allowing actual Rust code to run nativel
by alberth 5y ago
So is this still converting the Rust code to Web Assembly (just doing it in a more developer friendly way)?
Or is this allowing actual Rust code to run natively on the Cloudflare Workers environment?
I ask because there is a significant difference in performance between native Rust and Web ASM.
EDIT: I found this benchmark [0]. It appears you can run Rust 3 different ways. 1. Natively (fastest), 2. Node with Rust Bindings (2x slower than native), or 3. wasm (8x slower than native).
I wonder if this announcement is Cloudflare supporting the #2 configuration above (Node with Rust Bindings).
[0] https://github.com/PSeitz/wana_kana_rust/tree/master/bench_compare https://github.com/PSeitz/wana_kana_rust/tree/master/bench_c...
- Siilwyn 5y agoHad the same thought, performance is quite key for most uses I think. Still compiles to web assembly probably because they mention running it in V8.
- edaemon 5y agoLooks like it's WASM: > Introducing the worker crate, available on GitHub and crates.io, which makes Rust developers feel right at home on the Workers platform by running code inside the V8 WebAssembly engine.
- Xevi 5y agoI think it's WASM, but the title says it's native. Maybe the word "native" has various meanings here. When I first read the title I was under the impression that it wasn't WASM.
- lilyball 5y agoWhat does "natively" mean in this context? Because my impression is "the Cloudflare Workers environment" defines WASM as its "native" architecture.
- alberth 5y agoThat's exactly why I ask :) It seems like this is still WASM. I wonder if this is "Node with Rust bindings" as my EDIT comment alludes too.
- tyingq 5y agoCloudflare Workers run in V8 isolates, so it would have to be WASM. It would be difficult to do something else and keep the current pricing model (including the free tier), since the overhead per Worker is pretty low with this approach. See https://developers.cloudflare.com/workers/learning/how-workers-works https://developers.cloudflare.com/workers/learning/how-worke... Edit: "Native" does seem misleading in the title. "Streamlined Rust Support on Cloudflare Workers" would have been more straightforward.