Main reason why creating web api's in rust is slow (not really) is the thing with routing.
In every framework you must to set route handlers by hand, so i've made simple build.rs scripts
to speed up this process.
Routes are stored in src/pages
dir, they are automatically scanned and added to router
(Actix, Axum, Cloudflare and event Vercel with custom router implementation).
I'm not creating own Responses so your function declarations are the same. Only Vercel have different implementation, because it doesn't have bullt in router.
cargo install qaf
# | Actix | Axum | Cloudflare Workers | Vercel Edge |
---|---|---|---|---|
Routing | Dir based | Dir based | Dir based | Dir based |
Database | Mysql and Postgres (SQLX) | Mysql and Postgres (SQLX) | Planetscale | Planetscale |
Websockets | Tungstenite | Tungstenite | Yes | No |
Docker | Yes | Yes | No | No |
Dev command | Yes | Yes | Yes | Yes |