[workspace]
members = [
    "data",
    "crypto",
    "common",
    "database",
    "protocol",
    "gameserver",
    "httpserver",
]
resolver = "2"

[workspace.package]
edition = "2024"
version = "0.1.0"

[workspace.dependencies]
#Framework
actix-web = { version = "4.11.0", features = ["rustls-0_22"] }
rustls = "0.22"
rustls-pemfile = "2.2.0"
tokio = { version = "1", features = ["full"] }

# Database
sqlx = { version = "0.8.6", features = [
    "runtime-tokio-rustls",
    "sqlite",
    "macros",
    "migrate",
] }

#tracing
ansi_term = "0.12.1"
tracing-subscriber = "0.3.20"
tracing = "0.1.41"
anyhow = "1.0.100"
thiserror = "2.0.17"

#proto
prost = "0.14.1"
prost-types = "0.14.1"
prost-build = "0.14.1"

# Serialization
serde = { version = "1.0", features = ["derive"] }
serde_with = "3.15.0"
serde_json = "1.0.145"

#crypto
aes = "0.8"
cbc = { version = "0.1", features = ["alloc"] }
base64 = "0.22"
sha1 = "0.10"
once_cell = "1.19"
rand = "0.9.2"
hex = "0.4.3"

#util
chrono = "0.4.42"
paste = "1.0.15"

#paths
data = { path = "data" }
crypto = { path = "crypto" }
common = { path = "common" }
database = { path = "database" }
protocol = { path = "protocol" }
gameserver = { path = "gameserver" }
httpserver = { path = "httpserver" }

[profile.release]
strip = true      # Automatically strip symbols from the binary.
lto = true        # Link-time optimization.
opt-level = 3     # Optimize for speed.
codegen-units = 1 # Maximum size reduction optimizations.
