Files
admin db99ce1521 docs: 文档与注释系统性对齐插件化现状 + 清理前身实现引用
- readme §16 补 1.0.10-1.0.13 四条变更记录;§12.6 tag 表补 1.0.9-1.0.13
- readme §5 架构图更新为插件化结构(PLUGINS 注册表/四开关/四表)
- readme §11 补 api-proxies.json 数据模型小节;§8 管理台表格补 API 代理行
- readme/CLAUDE.md 测试断言数对齐 262(102+160);三个 JSON 改四个
- CLAUDE.md LLM 落点表改 crates/plugin-llm 路径;发版补 git push 前置教训
- 清理全部前身实现引用(readme 三处、CLAUDE.md 性能章节、util.rs 注释)
- PLUGIN_ARCHITECTURE.md 增补 1.0.13 sso 合流记录
2026-09-13 18:27:28 +08:00

53 lines
2.5 KiB
TOML
Raw Permalink 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.
# iPass workspace:内核(crates/ipass-core)+ 唯一 cdylib(gateway)。
# 插件(plugin-domain / plugin-llm / plugin-apix)按 docs/plugin/PLUGINIZATION_PLAN.md 逐步迁入。
#
# ⚠️ [profile.release] 只能放 workspace 根:member 里写会被 cargo 静默忽略,
# panic="abort" 丢了就意味着 panic 可能跨 FFI 边界展开进 nginx。
[workspace]
resolver = "2"
members = ["crates/ipass-core", "crates/plugin-domain", "crates/plugin-llm", "crates/plugin-apix", "gateway"]
# 独立 workspace:vendored 的 ngx-rust 本身是 workspace 根,需显式排除以免歧义
exclude = ["vendor/ngx-rust"]
[workspace.package]
edition = "2021"
publish = false
[workspace.dependencies]
# ⚠️ 依赖必须用 vendored 源码,不能走 crates.io,也不能走 git:
#
# 1) `ngx = "0.5"`(crates.io 0.5.1)只发布了配置阶段接口(HttpModule),
# 请求阶段 API(add_phase_handler / HttpPhase / HttpRequestHandler)尚未发版,
# 实测直接编译失败:unresolved imports `ngx::http::HttpPhase`
#
# 2) git 依赖会永久挂起:ngx-rust 挂了一个指向完整 nginx 仓库的 submodule
# [submodule "nginx-src/nginx"] url = https://github.com/nginx/nginx.git
# cargo 解析 git 依赖时会 update_submodules,去克隆几十 MB 的 nginx 仓库,
# 国内网络下卡死(实测 cargo 5 分钟 0% CPU,调用栈停在
# GitCheckout::update_submodules -> fetch -> wait4)。
#
# 因此 vendor 到 vendor/ngx-rust/,用 path 依赖:离线可编译、无子模块、版本锁定。
ngx = { path = "vendor/ngx-rust" }
nginx-sys = { path = "vendor/ngx-rust/nginx-sys" }
# 业务层依赖:全部是纯 Rust 实现,不引入任何系统库或常驻依赖
serde = { version = "1", features = ["derive"] }
serde_json = "1" # 序列化为紧凑 JSON;空 Vec/Vec<Map> 自动产出 [] / {}
sha2 = "0.10" # 迭代加盐 SHA-256;hash_password 算法已用独立 Python 实现逐位核对过
getrandom = "0.2" # 不可退化成可预测伪随机(API Key / salt 由它生成)
libc = "0.2" # 仅用于 localtime_r(取本地时区)
# 内核 crate(插件/gateway 一律引用它,方向只能是 plugin → core)
ipass-core = { path = "crates/ipass-core" }
plugin-domain = { path = "crates/plugin-domain" }
plugin-llm = { path = "crates/plugin-llm" }
plugin-apix = { path = "crates/plugin-apix" }
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
# 模块被加载进 nginx 这个 C 进程,panic 绝不能跨 FFI 边界展开
panic = "abort"
strip = true