JasonYANG170 的 LogoYANG Docs
首页
硬件
软件
AI
3D
主站
首页
硬件
软件
AI
3D
主站
GitHub

RustActixWebServer

基于 Rust 和 Actix Web 的轻量级静态文件服务器。 | Lightweight static file server built with Rust and Actix Web.

Rust2026-10-04T16:10:22Z★ 1
查看原始项目 ↗
RustActixWebServer

项目文档

简体中文 | English

RustActixWebServer

使用 Rust、Actix Web 与 actix-files 实现的轻量级静态文件服务器。

运行

安装 Rust 与 Cargo 后,在仓库根目录运行:

cargo run

浏览器访问 http://127.0.0.1:8080/。服务器监听本机的 127.0.0.1:8080,将 ./apk 目录挂载到 /,默认首页为 index.html,并设置默认响应头 Content-Type: text/html。

项目结构

  • src/main.rs:服务器入口与路由配置。
  • apk/:提供给浏览器访问的静态文件。
  • Cargo.toml:Rust 2021 项目,依赖 actix-web 4.5.1 与 actix-files 0.6.5。
首页/软件项目