Skip to content

v0.1.0

Latest

Choose a tag to compare

@woodchen-ink woodchen-ink released this 28 Nov 16:34
· 1 commit to main since this release

首个版本, 移植 go-web-utils 的七个 Web 工具模块, 对外行为与 Go 版对齐。

  • iputil: 客户端真实 IP (Cloudflare / EdgeOne / 阿里 / 华为 / 百度 / 七牛 / 网宿 / Fastly / CloudFront / Azure)、可信代理 TrustedProxies、IP 与 CIDR 判断
  • uautil: 机器人 / 浏览器识别, tower 中间件 BlockBotLayer / BrowserOnlyLayer
  • resputil: 统一 JSON 响应 { code, data, msg }, 空数据永不返回 null, Axum IntoResponse
  • timex: 业务时区初始化与自然日 / 周 / 月边界
  • cookieutil: 强制 HttpOnly 的认证 Cookie, CSRF double-submit
  • cronutil: IdleBackoff / TickGuard / 基于 Tokio 的 Debounced
  • nextstatic: Next.js 15/16 静态导出托管, 可直接作 Axum fallback_service

与 Go 版的差异见文档站 https://rust-web-utils.czl.net/docs 。

引用:

rust-web-utils = { git = "https://github.com/woodchen-ink/rust-web-utils", tag = "v0.1.0", features = ["axum", "tower"] }

最低 Rust 版本 1.88。