News for hackers. Stuff that matters.
Re:Native Rust Support on Cloudflare Workers by alberth on Thursday September 09, 2021 @01:54PM (#28472588)
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_c...

Re:Native Rust Support on Cloudflare Workers by tyingq on Thursday September 09, 2021 @03:27PM (#28473631)
Cloudflare 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-worke...

Edit: "Native" does seem misleading in the title. "Streamlined Rust Support on Cloudflare Workers" would have been more straightforward.

Re:Native Rust Support on Cloudflare Workers by edaemon on Thursday September 09, 2021 @02:02PM (#28472672)
Looks 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.

Re:Native Rust Support on Cloudflare Workers by Xevi on Thursday September 09, 2021 @02:11PM (#28472779)
I 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.
Re:Native Rust Support on Cloudflare Workers by lilyball on Thursday September 09, 2021 @02:27PM (#28472958)
What does "natively" mean in this context? Because my impression is "the Cloudflare Workers environment" defines WASM as its "native" architecture.
Re:Native Rust Support on Cloudflare Workers by alberth on Thursday September 09, 2021 @03:26PM (#28473614)
That'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.

Re:Native Rust Support on Cloudflare Workers by Siilwyn on Thursday September 09, 2021 @01:59PM (#28472632)
Had 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.