Files
tdc-rs/Cargo.toml
T
admin 8a351b7de9 feat(p1): 接入 sspf v0.2.0 平台包(git tag 锁版本)
- 锁 rustc 1.95.0 与平台一致;release 去掉 panic=abort,保留 catch-all 所需 unwind
- 新增 P1 接入探针:只靠门面起单端口/单库,验面 B 登录、注入 DDL 与业务端点、零示例包
- 同步 CLAUDE.md 的 profile 描述;记录装配切换的状态类型阻断
2026-11-04 17:16:57 +08:00

67 lines
2.7 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]
# 🔴 sspf 标准平台包(JNPF 兼容底座)—— 业务仓唯一的平台依赖,按 tag 锁版本。
# 开发期调试可临时换 path = "../ssw-platform/crates/sspf";交付一律用 git tag。
sspf = { git = "http://127.0.0.1:13300/ssw/ssw-platform.git", tag = "v0.2.0" }
# 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"
# 登录口令加解密(与上游前端 cipher.ts 对齐):AES-256-ECB + MD5
# 🔴 版本组合自洽,别混用:aes 0.8 / ecb 0.1 都依赖 cipher 0.4 家族;
# aes 0.9 / ecb 0.2 是 cipher 0.5 家族,两套泛型不通用。
# 🔴 md-5 钉 0.10(crate 名 `md5`,`use md5::{Digest, Md5};`);0.11 的 API 不同。
aes = "0.8"
ecb = "0.1"
md-5 = "0.10"
# 登录表单解析(application/x-www-form-urlencoded)。
# ⚠️ axum 0.8.9 的 `Form<T>` 只实现 `FromRequest`、不实现 `OptionalFromRequest`
# ⇒ `Option<Form<T>>` 编译不过 ⇒ 改为「取原始 body + serde_urlencoded 自己解析」。
# `serde_urlencoded 0.7.1` 已在 `Cargo.lock` 里(axum 的传递依赖)⇒ 不引入新下载。
serde_urlencoded = "0.7"
# 内嵌 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"`:单进程链接 sspf 后,平台契约 §6.5 要求
# panic ⇒ HTTP 200 + code=400,catch-all 中间件依赖默认的 `panic = "unwind"`。
# abort 下 `catch_unwind` 抓不到 ⇒ 进程直接死、客户端连接重置。
codegen-units = 16
[profile.dev]
incremental = false