This isn't trolling, it's my genuine ignorance- I thought Actix was the goto web framework for Rust? I don't do a whole lot of Rust and when I do it isn't http router type work so I'm out of the loop here.
Looking at stats on crates.io for a few frameworks
- axum: 100k installs/day
- warp: 25k installs/day
- actix: 15k installs/day
- rocket: 7k installs/day
- tide: 1k installs/day
(For comparison, hyper - the HTTP library that most web frameworks use under the hood - is at 200k/day, many of which are using it for client rather than server functions. So unless there is another not-hyper-based framework out there, then I’d be moderately confident guessing that axum has >50% of the server market)
Actix used to be the fastest (maybe still is? all the frameworks are so fast it doesn't even matter that much anymore) and most popular framework.
Then a bit of drama happened about the hard life of maintaining an OSS project with users criticising you (the usual).
Rocket seemed to gain popularity for a bit but then there was some drama with the maintainer disappearing / not releasing 0.5 for a long time.
Meanwhile, quietly, the guys who did tokio (the most popular async runtime) released axum, which is compatible with tower middlewares. So they had tons of features pretty early.
I switched from actix to axum around 0.4 and updates have been very sensible and kept improving the DX.
I think you’re a little understating what happened to the developer.
There was like 3 uses of “unsafe” and the developer was being systematically attacked and harassed by the rust community for months.
It wasn’t “a bit”, nor would I call it “the usual”. The rust subreddit and discord literally organized brigading and harassment campaigns against the dude.
One year ago it was still the standard and I think most production workload still are using actix (we are). When you dig into actix you feel the pre-async decisions (acceptor threads, worker threads, futures not send).
But for a lot of usecases this model is faster than Axum work stealing. I am not a super huge fan of hyper (on which Axum is based), I salute the work (it is impressive) but it is very clunky to use, the code is hard to read and usage is super opiniated.
I think Actix used to be the goto web framework at the time is because it was the most complete, it's still a solid choice. What I think made Axum more popular aside from the features added is that it's part of the tokio-rs projects.
I used to use Actix for a web project, but the Websocket story was severely lacking. Actix is non-work-stealing multi-threaded (to achieve "performance", I presume) and thus it has to use a non-async Actor model for inter-Websocket interactions. This meant that I could not use an async DB pool or an async HTTP requests library within my Websocket code.
Alternatively, Axum is built by the same people that made tokio, is work-stealing multi-threaded, and the Websocket code is async be default. It is just overall a better library.
When I looked into it while starting a new project about a year ago, Axum seemed like the framework with the most inertia. I think there was some concern a year or two back about whether Actix would continue to be maintained, but it looks healthy now.
They're probably both fine choices, I chose Axum because the middleware architecture was easier to grok and at the time I felt that staying under the tokio umbrella would be safer long term.
- axum: 100k installs/day
- warp: 25k installs/day
- actix: 15k installs/day
- rocket: 7k installs/day
- tide: 1k installs/day
(For comparison, hyper - the HTTP library that most web frameworks use under the hood - is at 200k/day, many of which are using it for client rather than server functions. So unless there is another not-hyper-based framework out there, then I’d be moderately confident guessing that axum has >50% of the server market)