News for hackers. Stuff that matters.
Re:Rust for web development: 2 years later by ZeroCool2u on Wednesday February 24, 2021 @03:10PM (#26255081)
I've been looking at Rust API frameworks and the question I keep finding myself asking is, what is the FastAPI equivalent in Rust?
Re:Rust for web development: 2 years later by steveklabnik on Wednesday February 24, 2021 @03:24PM (#26255284)
I don't know a ton about FastAPI, but it seems like it's based on OpenAPI. I posted below about Dropshot, which the company I work for wrote, is using and open sourced.

https://crates.io/crates/dropshot

It may or may not interest you!

Re:Rust for web development: 2 years later by ZeroCool2u on Wednesday February 24, 2021 @04:11PM (#26255997)
Yeah, this does look kind of similar, I'll take a look. Thank you!

I'd say the most powerful part of FastAPI is that it integrates everything in a relatively opinionated way, that you would spend a lot of time setting up Flask plugins/extensions for to get an equivalent feature set.

I'm not sure I'd say it's based on OpenAPI(?), but it does automatically generate OpenAPI based docs from your Python code. There's no intermediate step, the '.../docs' route just exists at runtime.