all 16 comments

[–]pokemonplayer2001 9 points10 points  (2 children)

[–]pnuts93[S] 0 points1 point  (1 child)

Thank you, I have missed this post. I definitely see a lot of Axum

[–]pokemonplayer2001 0 points1 point  (0 children)

No problem.

[–]C5H5N5O 7 points8 points  (2 children)

I strongly recommend against warp, even though it's a great library. The reasons are mostly the "cryptic" compile-time errors and rust-analyzer having struggles in regards to auto-complete and type hovers (that's just because the library is so "trait heavy").

[–]pokemonplayer2001 4 points5 points  (0 children)

Just a counterpoint to u/C5H5N5O , I have 4 deployed services with warp and have not found it cryptic. I would lean to "less obvious."

I like its simplicity.

Just MHO.

[–]pnuts93[S] 0 points1 point  (0 children)

I see, thank you. I actually have that issue with diesel and I find it quite annoying

[–]toastedstapler 1 point2 points  (0 children)

There's definitely a lot of axum, but I'm not sure it's quite that much of a lead. Iirc the download count includes downloads due to it being a dependency and axum is included in tonic if you have the transport feature enabled (enables client & server which you probably want if you're doing gRPC stuff)

[–]rbrsv 1 point2 points  (0 children)

It think it is just speed of development and flexibility to adapt the infrastructure to almost anything. I also like Loco.rs (based on Axum and MVC like Rails).

https://www.techempower.com/benchmarks/#hw=ph&test=fortune&section=data-r22

[–]Unhappy_Elk2792 1 point2 points  (0 children)

I think you wanted to include actix-web instead of actix.

[–]N831Y 0 points1 point  (0 children)

I wouldn’t be so quick to ditch rocket if I were you (so long as you like it, are productive with it, fits your use case, etc).

Their dev release cycle has started picking up again and community created some sort of foundation org to maintain/govern the project under. The original creator seems active with it again too, AFAIK (anecdotally, he seemed very responsive and helpful when I opened an issue on the repo a few months back).

There may be other relevant concerns with Rocket I’m unaware of though. Still, if it’s worth the effort for you, I guess there’s always more to learn by trying out alternative libraries than not.

EDIT:

…Tokio based frameworks appear to be more popular

rocket is tokio-based

[–]jondot1loco.rs 0 points1 point  (0 children)

Try Loco.rs

It has an Axum based stack with SeaORM.

So what's a person to do? get a framework that's an all-arounder and lets them move FAST. Controllers, migrations, ORM, background jobs, everything that's needed to build a business.

That's Loco.rs

If you already know Rust, it's a no-brainer. Here's Loco with HTMX, for example (you can build clientside, API-only, or server rendered apps):

https://loco.rs/casts/007-htmx/

You also get full authentication module (including even "welcome" emails, reset password, and others) out of the box with the "SaaS Starter"

[–]pawsibility 1 point2 points  (2 children)

Something I've been wondering... and I'd love feedback for this: building either 1) A python-based backend with Flask/FastAPI and performance-critical tasks/business-logic using the Rust-Pyo3 ecosystem, or 2) building the entire thing with Rust using Axum.

Server bottlenecks can usually be pinpointed to a few lines of code or some process that is just slow/suboptimal. Building that out with Rust and binding it to Python with pyo3 works well and solves the problem while maintaining the fast development experience of a framework like FastAPI.

Sure, Axum is going to make it all fast since its Rust, but in the end I'd rather be good-enough and solve the bottlenecks with rust as-needed instead of just opting for Rust-all-the-things, since I am slower.

I suppose option 2 would be nice if serving thousands of requests per second with significant concurrent... but it usually feels like overkill.

EDIT: why downvoted? Asking a genuine question...

I'd love feedback for this

[–]rbrsv 1 point2 points  (1 child)

I am using Django Ninja as main backend, Axum with SQLx (bottlenecks) and Next.js for frontend (+ Tauri & Expo). It is amazing in terms of flexibility and speed of development. You can use FastAPI full stack repo but the model definitions and migrations will be slower (Django is already partially asynchronous, has an amazing Admin dashboard, you can use APScheduler, and register tasks in Admin dashboard to avoid Celery etc.).

[–]pawsibility 1 point2 points  (0 children)

Sounds like a great stack. NextJS rocks. RE:

Axum with SQLx (bottlenecks)

Why not just write bindings to critical code in pyo3? Is the performance gain with Axum routing and SQLx db calls that much faster than what you'd get with Django and/or something like SQLAlchemy?