[package]
edition = "2021"
rust-version = "1.95"
name = "net_backend_server"
version = "0.2.0"
build = false
exclude = [
"NOTES.md",
"docs/",
"/target",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "A framework for game backend servers: tokio + axum, modules with hooks, MySQL / PostgreSQL / SQLite, migrations, OpenAPI."
homepage = "https://net-backend.com"
readme = "README.md"
keywords = [
"gamedev",
"server",
"backend",
"axum",
"websocket",
]
categories = [
"game-development",
"network-programming",
"web-programming::http-server",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/warmar94/net_backend"
[package.metadata.docs.rs]
all-features = true
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
chat = []
default = ["postgres"]
files = [
"axum/multipart",
"tokio/fs",
"tokio/io-util",
]
friends = []
groups = []
leaderboards = []
lobbies = []
matchmaking = []
mysql = [
"sqlx/mysql",
"sqlx/tls-rustls-ring-webpki",
"sea-query-sqlx/sqlx-mysql",
]
notifications = []
oauth = [
"dep:ring",
"dep:base64",
"dep:hyper-rustls",
"dep:rustls",
"hyper-util/client-legacy",
"hyper-util/http1",
]
postgres = [
"sqlx/postgres",
"sqlx/tls-rustls-ring-webpki",
"sea-query-sqlx/sqlx-postgres",
]
smtp = ["dep:lettre"]
sqlite = [
"sqlx/sqlite-bundled",
"sea-query-sqlx/sqlx-sqlite",
]
steam = [
"dep:hyper-rustls",
"dep:rustls",
"hyper-util/client-legacy",
"hyper-util/http1",
]
storage = []
[lib]
name = "net_backend_server"
path = "src/lib.rs"
[[example]]
name = "minimal"
path = "examples/minimal.rs"
[[example]]
name = "server"
path = "examples/server.rs"
required-features = [
"storage",
"chat",
"leaderboards",
"notifications",
"friends",
"groups",
"oauth",
"lobbies",
"matchmaking",
"files",
]
[[test]]
name = "auth"
path = "tests/auth.rs"
[[test]]
name = "chat"
path = "tests/chat.rs"
[[test]]
name = "chat_extras"
path = "tests/chat_extras.rs"
[[test]]
name = "cli"
path = "tests/cli.rs"
[[test]]
name = "db"
path = "tests/db.rs"
[[test]]
name = "external_fakes"
path = "tests/external_fakes.rs"
[[test]]
name = "files"
path = "tests/files.rs"
[[test]]
name = "friends"
path = "tests/friends.rs"
[[test]]
name = "friends_presence_cost"
path = "tests/friends_presence_cost.rs"
[[test]]
name = "friends_steam"
path = "tests/friends_steam.rs"
[[test]]
name = "groups"
path = "tests/groups.rs"
[[test]]
name = "http"
path = "tests/http.rs"
[[test]]
name = "leaderboards"
path = "tests/leaderboards.rs"
[[test]]
name = "lobbies"
path = "tests/lobbies.rs"
[[test]]
name = "login_work"
path = "tests/login_work.rs"
[[test]]
name = "matchmaking"
path = "tests/matchmaking.rs"
[[test]]
name = "notifications"
path = "tests/notifications.rs"
[[test]]
name = "oauth"
path = "tests/oauth.rs"
[[test]]
name = "permissions"
path = "tests/permissions.rs"
[[test]]
name = "routes"
path = "tests/routes.rs"
[[test]]
name = "serve"
path = "tests/serve.rs"
[[test]]
name = "sqlite_write_mode"
path = "tests/sqlite_write_mode.rs"
[[test]]
name = "storage"
path = "tests/storage.rs"
[[test]]
name = "storage_visibility"
path = "tests/storage_visibility.rs"
[[test]]
name = "ws"
path = "tests/ws.rs"
[[test]]
name = "ws_log"
path = "tests/ws_log.rs"
[[test]]
name = "ws_memory"
path = "tests/ws_memory.rs"
[dependencies.argon2]
version = "0.6.0"
[dependencies.axum]
version = "0.8.9"
features = [
"http1",
"json",
"matched-path",
"original-uri",
"query",
"tokio",
"tracing",
"ws",
]
default-features = false
[dependencies.base64]
version = "0.22.1"
features = ["alloc"]
optional = true
default-features = false
[dependencies.clap]
version = "4.5"
features = [
"std",
"derive",
"help",
"usage",
"error-context",
]
default-features = false
[dependencies.futures-util]
version = "0.3.31"
features = [
"std",
"sink",
]
default-features = false
[dependencies.getrandom]
version = "0.4.3"
[dependencies.hmac]
version = "0.12.1"
[dependencies.http]
version = "1.3"
[dependencies.http-body]
version = "1.0"
[dependencies.hyper]
version = "1.6"
features = [
"server",
"http1",
]
[dependencies.hyper-rustls]
version = "0.27.10"
features = [
"http1",
"ring",
"tls12",
"webpki-tokio",
]
optional = true
default-features = false
[dependencies.hyper-util]
version = "0.1.10"
features = [
"tokio",
"server",
"http1",
"service",
]
default-features = false
[dependencies.lettre]
version = "0.11.23"
features = [
"builder",
"smtp-transport",
"tokio1",
"tokio1-rustls",
"rustls-tls",
]
optional = true
default-features = false
[dependencies.metrics]
version = "0.24.2"
[dependencies.metrics-exporter-prometheus]
version = "0.18.3"
default-features = false
[dependencies.net_backend_protocol]
version = "0.2.0"
[dependencies.ring]
version = "0.17.14"
optional = true
[dependencies.rustls]
version = "0.23.31"
features = [
"ring",
"std",
"tls12",
]
optional = true
default-features = false
[dependencies.sea-query]
version = "1.0.2"
features = [
"backend-mysql",
"backend-postgres",
"backend-sqlite",
"thread-safe",
]
default-features = false
[dependencies.sea-query-sqlx]
version = "0.9.1"
default-features = false
[dependencies.serde]
version = "1.0.219"
features = [
"derive",
"rc",
]
[dependencies.serde_json]
version = "1.0.140"
[dependencies.sha2]
version = "0.10.9"
default-features = false
[dependencies.sqlx]
version = "0.9.0"
features = [
"runtime-tokio",
"derive",
]
default-features = false
[dependencies.thiserror]
version = "2.0.12"
[dependencies.tokio]
version = "1.47"
features = [
"rt-multi-thread",
"macros",
"net",
"signal",
"sync",
"time",
]
[dependencies.tokio-tungstenite]
version = "0.29.0"
default-features = false
[dependencies.toml]
version = "1.0"
features = [
"parse",
"display",
"serde",
"std",
]
default-features = false
[dependencies.tower]
version = "0.5.2"
features = ["util"]
default-features = false
[dependencies.tower-http]
version = "0.7.1"
features = [
"catch-panic",
"cors",
"limit",
"trace",
]
default-features = false
[dependencies.tracing]
version = "0.1.41"
[dependencies.tracing-subscriber]
version = "0.3.19"
features = [
"std",
"fmt",
"ansi",
"env-filter",
"json",
]
default-features = false
[dependencies.tungstenite]
version = "0.29.0"
features = ["handshake"]
default-features = false
[dependencies.unicode-normalization]
version = "0.1.25"
[dependencies.utoipa]
version = "6.0.0"
features = ["macros"]
default-features = false
[dependencies.utoipa-axum]
version = "0.3.0"
[dev-dependencies.base64]
version = "0.22.1"
[dev-dependencies.futures-util]
version = "0.3.31"
features = [
"std",
"sink",
]
default-features = false
[dev-dependencies.http-body-util]
version = "0.1.3"
[dev-dependencies.log]
version = "0.4"
[dev-dependencies.ring]
version = "0.17.14"
[dev-dependencies.tokio]
version = "1.47"
features = [
"rt-multi-thread",
"macros",
"net",
"io-util",
"time",
"process",
]
[dev-dependencies.tokio-tungstenite]
version = "0.29.0"
features = [
"connect",
"handshake",
]
default-features = false