|
I've written a couple of relatively busy rust rest API things, and can recommend Axum as a new and tasty thing
|
# ¿ Jul 30, 2022 23:05 |
|
|
# ¿ May 12, 2024 18:32 |
|
Sounds like cargo vendor would be helpful
|
# ¿ Sep 17, 2022 08:32 |
|
Rust for backend is really sweet, we're building our latest service in it now. Using sqlx directly for the small amount of db stuff, an ORM seemed a bit overkill. We're using Axum as our web server/framework. Last i looked at rocket it didn't look as if it was very actively maintained anymore? Edit: yeah, latest rocket stable is pre-async, and their two 5.0 release candidates are from June 2021 and may 2022. Their repo doesn't appear to see very much activity either. I've previously built a small microservice using actix-web at work, and using axum this time feels a lot nicer and more ergonomic kujeger fucked around with this message at 01:42 on Sep 18, 2022 |
# ¿ Sep 18, 2022 01:34 |
|
As much as Python may/will be faster at prototyping stuff or whatnot, being really liberal with cloning in Rust will take away a lot of the initial speed bumps. Remember: keep calm, call .clone() !
|
# ¿ Dec 30, 2022 09:40 |
|
You could make State.update consume self:code:
|
# ¿ Feb 22, 2023 09:00 |
|
You can also wrap the stage contents in Rc/Arc, allowing you to clone the handle but not the content itself, e.g.code:
kujeger fucked around with this message at 10:54 on Feb 22, 2023 |
# ¿ Feb 22, 2023 10:52 |
|
Had somehow missed out on mem::replace, very nice!
|
# ¿ Feb 23, 2023 14:53 |
|
Seconding the C(++) and Haskell thing; I did a bit of C as a kid and a little Haskell more recently (plus python and perl at work) and found getting into Rust relatively easy and enjoyable, even switching from being a sysadmin to developer full time at roughly the same time. But I've also kept an eye on rust for years, never using it for anything "real" or at work until the last two years or so. The Java/Kotlin folks at work who've gotten into it had a bit more of a struggle having to think about memory as a thing at all, but now like it a lot. VSCode plus rust analyzer works very well for me.
|
# ¿ May 3, 2023 09:55 |
|
I've done a little with Iced, which worked well enough. Am curious about trying slint as well. It looks like Iced is more focused on giving native looks, while slint is more for custom stuff. e: oh yeah embedded, i don't think iced is going to work there
|
# ¿ May 5, 2023 08:52 |
|
Yeah axum is quite nice, we've found it a lot more ergonomic to work with than actix-web was. We even rewrote actix stuff we had into axum so we could standardize the stack.
|
# ¿ Jun 18, 2023 22:18 |
|
I don't know if it's best practice or whatnot, but we've been using the strum and strum_macros crates to easily derive Display for just that.
|
# ¿ Jul 3, 2023 15:34 |
|
|
# ¿ May 12, 2024 18:32 |
|
lifg posted:Exactly that simple. There's also this if you already use serde for (de)serializing stuff https://github.com/dtolnay/serde-repr
|
# ¿ Jul 5, 2023 09:44 |