TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Native Rust Support on Cloudflare Workers

248 pointsby elithrarover 3 years ago

9 comments

alberthover 3 years ago
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:&#x2F;&#x2F;github.com&#x2F;PSeitz&#x2F;wana_kana_rust&#x2F;tree&#x2F;master&#x2F;bench_compare" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;PSeitz&#x2F;wana_kana_rust&#x2F;tree&#x2F;master&#x2F;bench_c...</a>
评论 #28473631 未加载
评论 #28472672 未加载
评论 #28472779 未加载
评论 #28472958 未加载
评论 #28472632 未加载
paulgbover 3 years ago
I&#x27;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&#x27;s anyone from CloudFlare here, I have a question: does this support WebSockets? At first glance over the docs I don&#x27;t see an equivalent to WebSocketPair from the JS interface.
评论 #28470206 未加载
评论 #28471155 未加载
_Kater_Karlo_over 3 years ago
Oh, first time I heard about Cloudflare Workers. Must have been living under a rock. This looks very interesting in many regards.<p>I&#x27;m in the camp &quot;use Rust if you need it&quot;. Supporting Rust natively here makes a lot of sense for compute heavy applicatons. There&#x27;s still some 30 ms latency, so some single digit microseconds don&#x27;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.
eminence32over 3 years ago
This looks neat, but I&#x27;ve never had a good use-case for cloudflare workers. Are any of you doing fun things with workers?
评论 #28470167 未加载
评论 #28469613 未加载
评论 #28469972 未加载
评论 #28469646 未加载
评论 #28469774 未加载
评论 #28470540 未加载
评论 #28469869 未加载
评论 #28472389 未加载
评论 #28470224 未加载
评论 #28471183 未加载
评论 #28484807 未加载
steveklabnikover 3 years ago
Very excited to see what people build with this!
throwaway77384over 3 years ago
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&#x27;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.
评论 #28472250 未加载
F117-DKover 3 years ago
Would love to see a benchmark on this vs JS, as both would still run through V8?
dakomover 3 years ago
How does this compare to Fastly&#x27;s Lucet-based solution?
brightballover 3 years ago
Can you run Erlang on a Cloudflare Worker?
评论 #28471004 未加载