Registry / web-framework / actix-files

actix-files

JSON →
library0.6.10rscratesunverified

Static file serving for Actix Web.

# Cargo.toml [dependencies] actix-files = "0.6.10"
INSTALL
IMPORT
SIG · ACTIX-FILES
A
actix-files
web-frameworkrustv0.6.10
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Files
use actix_files::Files;

Serves static files from the './static' directory at '/static'.

use actix_web::{App, HttpServer}; use actix_files::Files; #[actix_web::main] async fn main() -> std::io::Result<()> { HttpServer::new(|| { App::new() .service(Files::new("/static", "./static").show_files_listing()) }) .bind("127.0.0.1:8080")? .run() .await }
Debug
Known issues
gotchaRequires an async runtime like tokio or async-std.
fix
Ensure you have a runtime set up, e.g., with #[actix_web::main].
affects: >=0.6.0
Upgrade
Version history
0.6.10latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
43 hits · last 30 days
node
38
OpenAI (training)
2
Resources
actix-files — cargo add actix-files · libregistry