Elektrine lite

← Feed

@natecox@tilde.zone

Post #1075708

2026-04-05 00:06 UTC

My enthusiasm for using cloudflare workers on #rust is diminishing pretty rapidly. The docs for workers-rs are frustratingly incomplete. Example: I want to use a durable object to store session data for a multi-user interface. workers-rs supports durable objects, seemed like they translated to structs very nicely, I was excited to get going with them. Then I started, and man it has been a wild ride. After a few hours I still have no idea how workers-rs actually wants me to get and set data. I know that I can use the attached Storage to .get and .put attributes... but then what was the point of setting up the object as a Struct? Why can't I just use the stub request to hydrate that struct from the storage? It _feels_ like that's the intent but there doesn't seem to be a path to it... or is there? Maybe it's time to give up rust for this and just write it with the native libraries.

Replies (0)

No replies.