Files
ssw-platform/Cargo.toml
T
sukyboor 9771fa844d init: 尚数网平台 JNPF 7.0 兼容后端(多应用 + 面 A/面 B 双契约)
- axum 0.8 + pglite:12 张表,多应用按 App-Code 头解析 f_system_id 隔离
- 面 A(ssw/react 形状)+ 面 B(官方 JNPF 形状,Vue-Version: 3)双契约并存
- 业务模块 asset/DataResource;面 B 用户 CRUD 9 条已落地
- 六道闸门 + 两把运行时尺子(perm-smoke 43 / perm-smoke-jnpf 23)
- scripts/:前端接口清单、页面依赖反查、运行时探针
2026-10-30 22:08:31 +08:00

55 lines
2.0 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.
# ssw-platform —— cargo workspace 根
#
# 🔴 **本文件是脚手架的一部分,复制到项目根时必须一起带上**
#
# 为什么必须有它:`src/backend/Cargo.toml` 里的
# `version.workspace = true` / `edition.workspace = true` / `xxx = { workspace = true }`
# 都要求**上层有一个 workspace 根**。缺了它,cargo 直接报
# `error: could not find Cargo.toml in ... or any parent directory`,
# 脚手架**根本编译不起来**。
#
# 这里只放「跨成员共享」的配置:成员列表、依赖版本、release profile。
# 成员 crate(src/backend)不得再写 [profile.*],否则 cargo 直接报错。
[workspace]
members = ["src/backend"]
resolver = "2"
[workspace.package]
version = "0.1.0"
edition = "2021"
# pglite-rs 0.2.7 要求 Rust ≥ 1.85(edition 2024 家族)。本机实测 rustc 1.95.0。
rust-version = "1.85"
# 依赖版本集中在此,成员 crate 一律用 `xxx = { workspace = true }` 继承。
#
# ⚠️ 版本锁死说明(不要随意升级):
# - 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};`)。
# - pglite-rs 0.2 的 **lib 名是 `pglite`**(`use pglite::PGlite;`),
# 且 0.2.7 没有 `memory://` 模式,`PGlite::open()` 只接受路径。
[workspace.dependencies]
axum = "0.8"
tokio = { version = "1", features = ["full"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_urlencoded = "0.7"
aes = "0.8"
ecb = "0.1"
md-5 = "0.10"
rand = "0.8"
uuid = { version = "1", features = ["v4"] }
hex = "0.4"
pglite-rs = "0.2"
chrono = "0.4"
[profile.release]
opt-level = 2
lto = "thin"
strip = "symbols"
# 🔴 不要设 `panic = "abort"`:契约 §6.5 要求 panic ⇒ HTTP 200 + code=400,
# 而 abort 下 `catch_unwind` 抓不到 panic(进程直接死 ⇒ 客户端连接重置)。
# catch-all 中间件依赖默认的 `panic = "unwind"`(Ruling P19)。
codegen-units = 16