Settings

Theme

Ask HN: What to use for a Rest API written in Rust?

3 points by csan_gonzo 3 years ago · 5 comments · 1 min read


Hey guys! Just starting with rust, I want to rebuild a few rest apis in it to get to know the language and the ecosystem better. I've been searching for the right libraries, right know we have a code generator in python that generates the models and schemas and the basic crud endpoints for them from the database ddl. I want to do a similar thing in rust, I found something similar with `diesel` and the `dsync` utility, although I don't really like orms, it has a nice and easy to use API for writing raw SQL. And for the web framework I found `axum` to be the friendliest (checked out rocket, actix-web and warp.). What do you guys recommend, what are your experiences with these and what do you see as a good bet for the future? (However I'd try to use a design similar to https://kerkour.com/rust-web-application-clean-architecture , so I might not depend on these libraries that much)

sn9 3 years ago

You probably want to check out the Zero to Production book which is about using Rust for back-end development.

https://www.zero2prod.com/

  • csan_gonzoOP 3 years ago

    I've purchased that book in january (with a 60% idscount) but completely forgot about it .. so I think it's time to finally give it a go :)

apanloco 3 years ago

I've written services in both Warp and Axum that are in production right now (hosted on k8s, with metrics, liveness probes, and all of that jazz that you expect from a service). I like Axum the most.

  • csan_gonzoOP 3 years ago

    Thanks for the answer, that’s good to hear. I’m planning on shifting our new backend services from python to rust (and elixir) and Axum is my main focus now for the rest apis with diesel or sqlx.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection