actix
2
总安装量
1
周安装量
#68927
全站排名
安装命令
npx skills add https://github.com/g1joshi/agent-skills --skill actix
Agent 安装分布
mcpjam
1
claude-code
1
replit
1
junie
1
zencoder
1
Skill 文档
Actix Web
Actix Web is one of the fastest web frameworks in the world (TechEmpower benchmarks). It uses the Actor Model (though less visible in v4) for concurrency.
When to Use
- Raw Speed: When req/sec is the primary metric.
- Microservices: Low footprint, high throughput services.
- WebSockets: Efficient handling of millions of connections (actix-web-actors).
Core Concepts
App Factory
App::new() is a factory called for each thread. State must be wrapped in web::Data.
Extractors
Similar to Axum, but uses web::Json, web::Path.
Actors (Actix)
The underlying system for async messages (optional in simple web apps but heavily used for WebSockets).
Best Practices (2025)
Do:
- Use
web::Data: For shared application state (DB pools). - Use
actix_web::main: The macro to run the async runtime.
Don’t:
- Don’t block the thread: Actix is single-threaded per worker. Blocking operations stop the world.