4 ms·
I really like Axum. Like... a lot. However, it feels petty weird sometimes as the extractor thing results in somewhat unusual-looking function signatures. Not
by lytedev 2y ago
I really like Axum. Like... a lot.
However, it feels petty weird sometimes as the extractor thing results in somewhat unusual-looking function signatures. Not a real problem and something I'm sure I would appreciate more if I understood exactly how it worked...
But it makes for really ergonomic definitions of route handlers. Even if it presently feels a little bit like weird or gross dependency injection.
- dgls 2y agoI'd recommend giving https://www.youtube.com/watch?v=Wnb_n5YktO8 https://www.youtube.com/watch?v=Wnb_n5YktO8 a watch if you want to learn how it all works. Although, after watching it I'm pretty convinced Axum is actually an alien technology designed by minds greater than our own...
- diggan 2y ago> https://www.youtube.com/watch?v=Wnb_n5YktO8 https://www.youtube.com/watch?v=Wnb_n5YktO8 Two hour video which is basically a raw dump of a past live stream... Is there any condensed version with the relevant information, or even better, a text article version?
- iknowstuff 2y agohttps://lunatic.solutions/blog/magic-handler-functions-in-rust/ https://lunatic.solutions/blog/magic-handler-functions-in-ru... https://github.com/alexpusch/rust-magic-patterns/blob/master/axum-style-magic-function-param/Readme.md https://github.com/alexpusch/rust-magic-patterns/blob/master...
- vimwizard 2y agoI had the same thought about both axum and diesel
- Kinrany 2y agoI wish they extracted the magic functions into a separate library. There is no reason for dependency injection to be tied to HTTP servers.
- maximilianburke 2y agoIsn’t that the point of Axum? It’s the convenience of route management (and more) built on top of an underlying HTTP server, in this case Hyper.
- iknowstuff 2y agohttps://github.com/alexpusch/rust-magic-patterns/blob/master/axum-style-magic-function-param/Readme.md https://github.com/alexpusch/rust-magic-patterns/blob/master...
- lytedev 2y agoExplained it perfectly. Thank you!
- deleted 2y ago[deleted]