Files
tdc-rs/Cargo.toml
T
adminandClaude Code 079dcff986 feat(console): 下线旧 API,托管上游完整前端构建产物
- 移除 /api/db/*、/api/ssw/tdc/node/identity*、/api/ssw/tdc/tds/* 及其旧 handler
- 静态托管改根挂载 + SPA fallback(深链回 index.html,vite base=/)
- /api/** 未命中回 404 + JSON(不吞成 SPA 的 HTML),/migrate.sql 同样 404
- 空体 405 改由响应改写中间件统一改写成业务信封,并保留 Allow 头
- 启动流程接入 registry::validate() fail-fast
- 交付 scripts/build-frontend.sh 作为可重放的前端构建入口

Co-Authored-By: Claude Code <[email protected]>
2026-10-25 04:09:10 +08:00

45 lines
1.4 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[package]
name = "tdc-connector"
version = "0.1.0"
edition = "2021"
description = "TDC (数据接入连接器) MVP — Rust + 静态 HTML + PGlite 本地优先实现"
[[bin]]
name = "tdc-connector"
path = "src/main.rs"
[dependencies]
# Web 框架 / 运行时
axum = "0.8"
tokio = { version = "1", features = ["full"] }
tower-http = { version = "0.6", features = ["fs", "cors", "trace"] }
# 序列化
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# TDS 跨方 HTTP 契约客户端(红线:TDC 与 TDS 只走 HTTP,不编译期耦合)
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"] }
rand = "0.8"
hex = "0.4"
# 内嵌 PostgreSQL(进程内原生编译,非 WASM):承载全部 tdc_* 业务数据
# 包名 pglite-rs,import 为 pglite。无需扩展时不用 build.rs/export_dynamic。
pglite-rs = "0.2"
# 真实 UTC 时间戳(last_heartbeat / 同步日志用,避免手写日历换算)
chrono = { version = "0.4", default-features = false, features = ["clock"] }
[dev-dependencies]
# 路由级中间件测试(Task 5 fix round 1):`tower::ServiceExt::oneshot` 打请求
tower = { version = "0.5", features = ["util"] }
http-body-util = "0.1"
[profile.release]
opt-level = 2
lto = "thin"
strip = "symbols" # 发布包剥离符号表,体积减半以上
panic = "abort" # 不生成 unwind 表,进一步缩小
codegen-units = 16