From 557882600e9501fe1f2ff0ebb01cdf2c7fa03108 Mon Sep 17 00:00:00 2001 From: "2569718930@qq.com" <2569718930@qq.com> Date: Wed, 13 May 2026 14:42:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=B8=82=E5=9C=BA=E7=9B=91?= =?UTF-8?q?=E6=8E=A7=E9=A2=91=E9=81=93=20Rust=20=E7=8B=AC=E7=AB=8B?= =?UTF-8?q?=E7=BD=91=E9=A1=B5=E7=89=88=E6=96=B9=E6=A1=88=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 直读 SQLite airport_obs_log,零 Python 依赖,Axum+Askama+HTMX 纯展示 --- docs/market-monitoring-web.md | 282 ++++++++++++++++++++++++++++++++++ 1 file changed, 282 insertions(+) create mode 100644 docs/market-monitoring-web.md diff --git a/docs/market-monitoring-web.md b/docs/market-monitoring-web.md new file mode 100644 index 00000000..37ecd8c3 --- /dev/null +++ b/docs/market-monitoring-web.md @@ -0,0 +1,282 @@ +# 市场监控频道 — Rust 独立网页版 + +## 架构 + +``` +浏览器 http://VPS:3001 + │ + ▼ +Rust 独立进程 (Axum + Askama + HTMX) + │ 直接读 SQLite + ▼ +polyweather.db ← Python 采集管道写入 + └ airport_obs_log 表 + └ deb_predictions 表(今日最高实测) +``` + +零 Python 依赖。Rust 直接从 SQLite 拿温度数据,自给自足。 + +## 技术选型 + +| 层 | 库 | 理由 | +|---|---|---| +| HTTP 服务 | **Axum** 0.8 | Tokio 生态,类型安全路由 | +| 模板引擎 | **Askama** 0.12 | 编译期检查模板,零运行时开销 | +| SQLite | **rusqlite** | 读 airport_obs_log 拿温度趋势 | +| 自动更新 | **HTMX** | 一个 `