DEV Community

Discussion on: Replacing FastAPI with Rust: Part 2 - Research

Collapse
 
follpvosten profile image
Sylvie Rinner

Rocket master got updated to support Tokio 1.0 just yesterday :D there are just no async releases yet, but there are many projects (like my current one or Conduit) that just ignore that and use Rocket master. It's a very pleasant experience.

Collapse
 
dbanty profile image
Dylan Anthony

I might end up giving it another try then! I just poked around the docs for master and there are even examples of how to use async. Very exciting!

Collapse
 
follpvosten profile image
Sylvie Rinner

Yeah it's actually still the greatest web framework in terms of developer experience for me! The only downside at the moment is probably that async database pooling isn't there yet (it's being worked on, but will probably take another month or two to actually land), so you can either use the existing sync database wrappers (which abstract over offloading requests to a threadpool fairly well) or use your own do-it-yourself database pool. (Well or do it like Conduit and I did, be crazy and use sled as your database :D)
I was thinking about adding a GraphQL API to my app instead of a REST API, but I'm still considering what to actually do, I might end up with both as well, so I may be interested in contributing to okapi at some point as well.