c48f0627cf
- 把 server-rs 与 apps/ai-game-creator-shell/src-tauri 两个 workspace 的 ts-rs 从 registry 固定到上游修复 commit fd8679ef20f866f747c046b30bd29c15e3d7a003(PR #491:已发布版 12.0.1 的 EnumAttr 不识别 deny_unknown_fields,只有 StructAttr 会静默忽略它),两个 Cargo.lock 同步改成 git 源 - 说明固定原因与退出条件:crates.io 最新仍是 12.0.1、GitHub 最新 tag 仍是 v12.0.0,等发布 > 12.0.1 后改回 registry 版本并删除 commit 固定 - 明确不使用 ts-rs 的 no-serde-warnings feature 消警:它会连同 deserialize_with 这类真实未支持的 serde 属性一起静默,掩盖 Rust 与 TS 绑定的漂移 - 保留 shared-contracts 的 Model3dMultiviewInputs enum 级 deny_unknown_fields(该属性一直由 serde 生效,告警只来自 ts-rs 的属性解析),注释改为写明不要为消警删属性、也不要改用 no-serde-warnings - 新增契约测试 tests/model3d_multiview_request_contract.rs:钉住 views/taskId 变体内部与请求体顶层拒绝未知字段,并覆盖 kind 与 camelCase 字段名解析 - 记录排障经验与决策:pitfalls.md 说明无 span 的告警不代表属性失效,decision-log.md 记录固定 commit、影响面与回退条件 - 验证:cargo check -p shared-contracts 与该 crate 的 cargo test 不再出现 deny_unknown_fields 告警且全绿;cargo test --locked -p shared-contracts model3d 加 prettier 后 packages/shared 的 model3d 绑定零 diff;AGC 的 cargo check --locked --bin genarrative-ai-game-creator-shell 不再出现该告警(AGC 侧仍保留 1 条既有的 deserialize_with 告警,与本改动无关);npm run check:encoding、npm run check:doc-index、git diff --check、cargo fmt --all --check 通过
162 lines
6.3 KiB
TOML
162 lines
6.3 KiB
TOML
# 当前阶段先建立虚拟 workspace。
|
||
# 后续按“主工程 crate + 独立模块 crate”模式逐项补充 members。
|
||
|
||
[workspace]
|
||
resolver = "2"
|
||
default-members = [
|
||
"crates/api-server",
|
||
]
|
||
exclude = [
|
||
"crates/agent-runtime-core",
|
||
"crates/agent-runtime-orchestration",
|
||
"crates/editor-adapter-api",
|
||
"crates/platform-agent",
|
||
]
|
||
members = [
|
||
"crates/api-server",
|
||
"crates/module-ai",
|
||
"crates/module-assets",
|
||
"crates/module-auth",
|
||
"crates/module-editor-agent",
|
||
"crates/module-runtime",
|
||
"crates/platform-oss",
|
||
"crates/platform-auth",
|
||
"crates/platform-audio",
|
||
"crates/platform-agent-harness",
|
||
"crates/platform-hyper3d",
|
||
"crates/platform-image",
|
||
"crates/platform-llm",
|
||
"crates/platform-matting",
|
||
"crates/platform-wechat",
|
||
"crates/platform-speech",
|
||
"crates/platform-tripo",
|
||
"crates/platform-editor-agent",
|
||
"crates/pingora-gateway",
|
||
"crates/preview-deployer-server",
|
||
"crates/server-manager-panel",
|
||
"crates/shared-contracts",
|
||
"crates/shared-kernel",
|
||
"crates/shared-logging",
|
||
"crates/spacetime-client",
|
||
"crates/spacetime-module",
|
||
"crates/tests-support",
|
||
]
|
||
|
||
[workspace.package]
|
||
edition = "2024"
|
||
version = "0.1.0"
|
||
license = "UNLICENSED"
|
||
|
||
[workspace.dependencies]
|
||
# 本地 workspace crate 路径统一在这里维护,成员 crate 只声明 feature 差异。
|
||
module-ai = { path = "crates/module-ai", default-features = false }
|
||
module-assets = { path = "crates/module-assets", default-features = false }
|
||
module-auth = { path = "crates/module-auth", default-features = false }
|
||
module-editor-agent = { path = "crates/module-editor-agent", default-features = false }
|
||
module-runtime = { path = "crates/module-runtime", default-features = false }
|
||
platform-agent-harness = { path = "crates/platform-agent-harness", default-features = false }
|
||
platform-editor-agent = { path = "crates/platform-editor-agent", default-features = false }
|
||
platform-auth = { path = "crates/platform-auth", default-features = false }
|
||
platform-audio = { path = "crates/platform-audio", default-features = false }
|
||
platform-hyper3d = { path = "crates/platform-hyper3d", default-features = false }
|
||
platform-image = { path = "crates/platform-image", default-features = false }
|
||
platform-llm = { path = "crates/platform-llm", default-features = false }
|
||
platform-matting = { path = "crates/platform-matting", default-features = false }
|
||
platform-oss = { path = "crates/platform-oss", default-features = false }
|
||
platform-speech = { path = "crates/platform-speech", default-features = false }
|
||
platform-tripo = { path = "crates/platform-tripo", default-features = false }
|
||
platform-wechat = { path = "crates/platform-wechat", default-features = false }
|
||
pingora-gateway = { path = "crates/pingora-gateway", default-features = false }
|
||
shared-contracts = { path = "crates/shared-contracts", default-features = false }
|
||
shared-kernel = { path = "crates/shared-kernel", default-features = false }
|
||
shared-logging = { path = "crates/shared-logging", default-features = false }
|
||
spacetime-client = { path = "crates/spacetime-client", default-features = false }
|
||
|
||
argon2 = "0.5"
|
||
aes = "0.8"
|
||
async-stream = "0.3"
|
||
async-trait = "0.1"
|
||
axum = "0.8"
|
||
base64 = "0.22"
|
||
cbc = { version = "0.1", features = ["alloc"] }
|
||
bytes = "1"
|
||
curl = "0.4"
|
||
csv = "1"
|
||
dotenvy = "0.15"
|
||
flate2 = "1"
|
||
futures-util = "0.3"
|
||
hmac = "0.12"
|
||
http-body-util = "0.1"
|
||
httpdate = "1"
|
||
hex = "0.4"
|
||
image = { version = "0.25", default-features = false }
|
||
png = "0.18"
|
||
jsonwebtoken = "9"
|
||
log = "0.4"
|
||
mime_guess = "2.0.5"
|
||
pingora = { version = "0.8.1", default-features = false, features = ["proxy", "rustls"] }
|
||
pingora-http = { version = "0.8.1", default-features = false }
|
||
pingora-proxy = { version = "0.8.1", default-features = false }
|
||
rand_core = "0.6"
|
||
reqwest = { version = "0.12", default-features = false }
|
||
regex = "1"
|
||
rmcp = { version = "=2.2.0", default-features = false }
|
||
ring = "0.17"
|
||
serde = { version = "1", features = ["derive"] }
|
||
serde_json = "1"
|
||
serde_urlencoded = "0.7"
|
||
sha1 = "0.10"
|
||
sha2 = "0.10"
|
||
socket2 = "0.6"
|
||
symphonia = { version = "0.5", default-features = false, features = ["mp3"] }
|
||
spacetimedb = "=2.8.3"
|
||
spacetimedb-sdk = "=2.8.3"
|
||
spacetimedb-lib = { version = "=2.8.3", default-features = false }
|
||
time = "0.3"
|
||
tokio = "1"
|
||
tokio-stream = "0.1"
|
||
tokio-tungstenite = "0.27"
|
||
tripo3d-sdk = { git = "https://github.com/VAST-AI-Research/tripo-rust-sdk.git", rev = "1986be88627b04b1fa582a795bf6ac15ae6e0c6d" }
|
||
# 已发布到 crates.io 的 ts-rs 12.0.1 解析不了 enum 级 `serde(deny_unknown_fields)`,
|
||
# 编译时会打印一条没有 span 的 “failed to parse serde attribute” 告警(该属性仍由 serde 生效)。
|
||
# 上游修复 #491 尚未发版(最新 tag 仍为 v12.0.0,main 版本号还是 12.0.1),因此固定到修复 commit;
|
||
# 等 crates.io 发布 > 12.0.1 后改回 registry 版本并删除本固定。不要改用
|
||
# `no-serde-warnings` 关告警:那会连同真实未支持的 serde 属性一起静默。
|
||
# 严格性契约测试见 shared-contracts/tests/model3d_multiview_request_contract.rs。
|
||
ts-rs = { git = "https://github.com/Aleph-Alpha/ts-rs", rev = "fd8679ef20f866f747c046b30bd29c15e3d7a003" }
|
||
tower = "0.5"
|
||
tower-http = "0.6"
|
||
tracing = "0.1"
|
||
opentelemetry = "0.31"
|
||
opentelemetry-appender-tracing = { version = "0.31", default-features = false, features = ["experimental_use_tracing_span_context"] }
|
||
opentelemetry-otlp = { version = "0.31", default-features = false, features = ["http-proto", "reqwest-blocking-client", "trace", "metrics", "logs"] }
|
||
opentelemetry_sdk = { version = "0.31", default-features = false, features = ["trace", "metrics", "logs"] }
|
||
tracing-opentelemetry = { version = "0.32", default-features = false }
|
||
tracing-subscriber = "0.3"
|
||
windows-sys = "0.61"
|
||
url = "2"
|
||
urlencoding = "2"
|
||
uuid = "1"
|
||
webp = "0.3"
|
||
x509-parser = "0.16"
|
||
zip = { version = "2", default-features = false }
|
||
|
||
[profile.dev]
|
||
opt-level = 0 # 默认 0,有人手滑改 1/2 会慢
|
||
debug = 1 # line-tables-only 比 full 快 30 %
|
||
codegen-units = 256 # 多单元并行 CodeGen
|
||
lto = "off" # dev 别开 LTO
|
||
incremental = true
|
||
|
||
[profile.test]
|
||
opt-level = 0
|
||
debug = 1
|
||
codegen-units = 256
|
||
lto = "off"
|
||
incremental = false
|
||
|
||
[profile.release]
|
||
opt-level = 3 # 最大优化等级
|
||
lto = "thin" # 启用 Thin LTO,平衡编译时间和性能
|
||
codegen-units = 1 # 减少并行代码生成单元,提升优化但增加编译时间
|