#rest #halo #web #dsl

halo-rest

halo rest(Web 适配层/中间件/路由 DSL)

1 unstable release

Uses new Rust 2024

0.1.0 Dec 27, 2025

#1399 in HTTP server


Used in halo-micro

Apache-2.0

41KB
919 lines

rest:halo 的 Web 适配层/中间件/路由 DSL。

说明:对外更推荐通过门面 crate halo 使用:

  • halo::rest::...
  • halo::rest::router! { ... }

halo

参考go-zero:包含基础库、Web 框架适配层,以及代码生成工具 rsctl

技术栈

  • Rust edition 2024
  • Cargo(依赖管理与构建)
  • 代码风格:rustfmt + clippy
  • CI:GitHub Actions(规划/持续完善)

项目结构

halo/
  core/        # 基础核心库(被 rest 引用)
  rest/        # Web 适配层/中间件/DSL(axum/actix 等)
  rsctl/       # 代码生成器与模板
  LICENSE
  README.md

使用说明

  • rsctl(代码生成器):请看 rsctl/README.md
  • rest(Web 适配层):请看 rest/ 下源码与示例(后续会补充文档)

许可证

本项目采用 Apache-2.0,详见 LICENSE

版本记录

详见 CHANGELOG.md

Dependencies

~6–23MB
~293K SLoC