News for hackers. Stuff that matters.
Re:Is Rust web yet? by mkl95 on Friday October 30, 2020 @07:41AM (#24941196)
Can you trivially write a CRUD service with Swagger docs and JWT authentication using Rust? And how does performance compare to a FastAPI app?
Re:Is Rust web yet? by steveklabnik on Friday October 30, 2020 @10:58AM (#24942906)
My company is writing services that use OpenAPI (aka Swagger) heavily. I don't believe we are doing JWT currently. https://github.com/oxidecomputer/dropshot

I've never used FastAPI, but https://www.techempower.com/benchmarks/#section=data-r19 (which is the first thing TechEmpower shows me) says that for this specific test (and maybe others are different, you should look into it!), FastAPI does 52,080 RPS, and actix-core does 651,144.

Re:Is Rust web yet? by Dowwie on Friday October 30, 2020 @12:07PM (#24943692)
One person's trivial 1-day of effort is another person's month. There's a solid jsonwebtoken library that could be used in a custom token authentication middleware, if the one in the ecosystem is unsatisfactory. It's not trivial to learn a web framework and how to write custom middleware, but if you know where to look for actix-web there is an example: https://github.com/actix/actix-extras/blob/master/actix-web-...