News for hackers. Stuff that matters.
Re:Native Rust Support on Cloudflare Workers by paulgb on Thursday September 09, 2021 @10:38AM (#28470175)
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.

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.

Re:Native Rust Support on Cloudflare Workers by nilslice on Thursday September 09, 2021 @10:40AM (#28470206)
Author here! No websocket support yet, but it’s definitely on the roadmap. If you have ideas or suggestions for a nice Rust interface for it please share on the GitHub repo. Would appreciate it!
Re:Native Rust Support on Cloudflare Workers by paulgb on Thursday September 09, 2021 @11:13AM (#28470583)
I've actually been giving this some thought as I've been working on a WebSocket server that hosts a WebAssembly module[1]. So far my approach has been to expose a function on the guest that is called when a message is received, and a function on the host that is called when the guest wants to send a message. It's simple, but it works. It would be pretty cool to have a simple interface like that, but with the power of durable objects as well.

https://github.com/jamsocket/jamsocket

Re:Native Rust Support on Cloudflare Workers by nilslice on Thursday September 09, 2021 @11:20AM (#28470665)
Jamsocket looks really cool! Will take a closer look.
Re:Native Rust Support on Cloudflare Workers by NicoJuicy on Thursday September 09, 2021 @12:00PM (#28471155)
Perhaps a good time to mention that there is a quite active discord channel on cloudflare workers here: https://discord.gg/5aTJwnMZ

A sample app app of cloudflare workers ( a status page with pings in multiple regions): https://github.com/eidam/cf-workers-status-page

And the framework on top of cloudflare workers, inspired on next.js : https://flareact.com/

Re:Native Rust Support on Cloudflare Workers by rita3ko on Thursday September 09, 2021 @12:58PM (#28471854)
also a good time to mention that if you build something in in rust using workers, you should submit it to win some free swag:

https://challenge.developers.cloudflare.com/

Re:Native Rust Support on Cloudflare Workers by sayanarijit on Thursday September 16, 2021 @01:27AM (#28548379)