So is this still converting the Rust code to Web Assembly (just doing it in a more developer friendly way)?<p>Or is this allowing actual Rust code to run natively on the Cloudflare Workers environment?<p>I ask because there is a significant difference in performance between native Rust and Web ASM.<p>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).<p>I wonder if this announcement is Cloudflare supporting the #2 configuration above (Node with Rust Bindings).<p>[0] <a href="https://github.com/PSeitz/wana_kana_rust/tree/master/bench_compare" rel="nofollow">https://github.com/PSeitz/wana_kana_rust/tree/master/bench_c...</a>
I'm excited to try this. I made an attempt at writing a Rust Durable Object a while back and it was cumbersome at the time, so this looks great.<p>If there's anyone from CloudFlare here, I have a question: does this support WebSockets? At first glance over the docs I don't see an equivalent to WebSocketPair from the JS interface.
Oh, first time I heard about Cloudflare Workers. Must have been living under a rock. This looks very interesting in many regards.<p>I'm in the camp "use Rust if you need it". Supporting Rust natively here makes a lot of sense for compute heavy applicatons. There's still some 30 ms latency, so some single digit microseconds don't really matter, but getting in the region of saving 2 digit microseconds in compute, the performance benefits of Rust start paying off (of course depending on the number of requests). So, I guess this is a great examples for choosing Rust.<p>The combo Cloudflare Workers and Rust is probably the fastest you can get for worldwide delivery of dynamic content. Really interesting stuff.
Random comment, but hoping someone may have an answer for me:<p>Has anyone here managed to deploy multiple workers sites as part of one worker?<p>Using KV storage, it should technically be possible to have one worker addressing multiple domains, so then, if you wanted to deploy multiple websites using one worker to serve static assets to multiple domains, could that be doable?<p>I am only mentioning this, as it still doesn't seem possible to just buy additional workers. You are still limited to 30 sites on workers sites. Which seems quite prohibitive, if you wanted to build a bunch of sites for clients for example.