Conversation

I really dislike the trend that several Rust web frameworks are following of using annotations on functions to define routes. Being able to quickly see which routes are available on an application in one place is extremely useful, as is using a function for multiple routes
6
59
I hope Rust gets a Yesod-like before it gets something along the lines of Servant tbh. Servant is cool, and I like it a lot, but the difficulty curve is ROUGH and I still get tripped up regularly. Type safe routes would be awesome either way though.
1
2
Replying to and
Until 0.14 added a Generic module for deriving routes from records (rather than :<|>) the type errors for large APIs could get monstrous. I haven’t tested the new stuff thoroughly, but errors are supposedly much better.
2
1
Outside the happy path (JSON APIs with JWT or Basic Auth) you’ll probably have to roll some stuff on your own. Because type level programming is still relatively heavy stuff, extending the library can get a little hairy depending on what you’re doing.
1
1
Show replies