- 修复 migration: role 从 ENUM 改为 VARCHAR(20) 以兼容 tokio-postgres - 修复 Cargo.toml: 将 chrono/argon2/uuid/rand 改为非 optional,添加 wasm-bindgen/getrandom js - 修复 main.rs: Tokio runtime panic,改用 std::thread + Runtime::new - 修复 db/mod.rs wasm stub: DummyPool 替代 deadpool_postgres - 修复 login/admin.rs: wasm_bindgen::JsCast 条件编译 - 验证通过: 注册✓ 登录✓ get_current_user✓ 重复注册拒绝✓ 错误密码✓ Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
34 lines
1.0 KiB
TOML
34 lines
1.0 KiB
TOML
[package]
|
|
name = "yggdrasil"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[dependencies]
|
|
dioxus = { version = "0.7.9", features = ["fullstack", "router"] }
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
tokio = { version = "1.52", features = ["full"], optional = true }
|
|
tokio-postgres = { version = "0.7", features = ["with-chrono-0_4"], optional = true }
|
|
deadpool-postgres = { version = "0.14", optional = true }
|
|
argon2 = "0.5"
|
|
uuid = { version = "1", features = ["v4", "js"] }
|
|
chrono = { version = "0.4", features = ["serde"] }
|
|
regex = "1.10"
|
|
dotenvy = { version = "0.15", optional = true }
|
|
rand = { version = "0.8", features = ["getrandom"] }
|
|
getrandom = { version = "0.2", features = ["js"] }
|
|
|
|
[target.'cfg(target_arch = "wasm32")'.dependencies]
|
|
web-sys = { version = "0.3", features = ["Document", "Window", "HtmlDocument", "Storage", "Element"] }
|
|
wasm-bindgen = "0.2"
|
|
|
|
[features]
|
|
default = []
|
|
web = ["dioxus/web"]
|
|
server = [
|
|
"dioxus/server",
|
|
"dep:tokio",
|
|
"dep:tokio-postgres",
|
|
"dep:deadpool-postgres",
|
|
"dep:dotenvy",
|
|
]
|