Files
tdc-rs/Cargo.toml
T
xstudio 885b108fe0 init: TDC 连接器 Rust MVP(pglite-rs 内嵌 + 静态 HTML 控制台)
从 ssw-mvp/boot/ssw-tdc(Spring Boot/JNPF,37 Controller)剥离重底座的本地优先实现:
- axum 单进程承担控制面/数据面/静态托管/TDC→TDS HTTP 契约网关
- pglite-rs 0.2 内嵌原生 PostgreSQL(进程内,非浏览器 WASM),19 张 tdc_* 表
- 静态 HTML + 原生 JS 控制台:schema 自省驱动 CRUD + 按表生命周期动作
- 红线:TDC↔TDS 只走 HTTP 契约,未配 SSW_TDS_BASE_URL 时 Noop 降级
- AGENTS.md 记录架构红线、命令速查与踩坑清单;docs/ 记录跨方契约细节
2026-10-24 10:31:06 +08:00

42 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"] }
# 连接器身份(软 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"] }
[profile.release]
opt-level = 2
lto = "thin"
strip = "symbols" # 发布包剥离符号表,体积减半以上
panic = "abort" # 不生成 unwind 表,进一步缩小
codegen-units = 16