yew-template/Cargo.toml
2024-10-16 17:48:15 +08:00

52 lines
1.2 KiB
TOML

[package]
name = "networkd"
version = "0.1.0"
edition = "2021"
default-run = "server"
[[bin]]
name = "server"
required-features = ["server"]
[[bin]]
name = "frontend"
required-features = ["frontend"]
[dependencies]
# both side
anyhow = "1"
include_dir = "0.7.4"
log = "0.4"
mime = "0.3.17"
mime_guess = "2.0.5"
thiserror = "1"
yew = { version = "0.21" }
yew-router = "0.18"
gloo = "0.10"
yew-agent = "0.3.0"
futures = "0.3"
wasm-bindgen = "0.2"
wasm-bindgen-futures = "0.4.45"
serde = { version = "1", features = ["derive"]}
web-sys = "0.3.70"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
# server side
axum = { version = "0.7", features = ["multipart", "tracing", "ws"] }
console-subscriber = { version = "0.4.0", optional = true }
tokio = { version = "1", features = ["full", "tracing"] }
tokio-stream = { version = "0.1", features = ["time"] }
tower = { version = "0.5", features = ["tracing", "util"] }
tower-http = { version = "0.6", features = ["util", "trace", "catch-panic"] }
tracing = "0.1"
tracing-subscriber = "0.3"
[target.'cfg(target_arch = "wasm32")'.dependencies]
# frontend side
wasm-logger = "0.2"
[features]
server = ["yew/ssr"]
frontend = ["yew/hydration"]
console-subscriber = ["dep:console-subscriber"]