[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"] } # 连接器身份(软 PKI:ed25519 密钥对,对应 scard 安全平面思路的本地版) ed25519-dalek = { version = "2", features = ["rand_core"] } 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