rust-web-server 18.0.0

Single-binary web server and reverse proxy: automatic HTTPS (Let's Encrypt), HTTP/1.1, HTTP/2 and HTTP/3, load balancing, auth and rate limiting, configured in one TOML file. Also a Rust library: routing, middleware, MCP server, ORM, background jobs. No hyper, no Tower; HTTP/2 and HTTP/3 framing via h2 and quinn.
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.88"
name = "rust-web-server"
version = "18.0.0"
authors = ["Bohdan Tsap <bohdan.tsap@tutanota.com>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Single-binary web server and reverse proxy: automatic HTTPS (Let's Encrypt), HTTP/1.1, HTTP/2 and HTTP/3, load balancing, auth and rate limiting, configured in one TOML file. Also a Rust library: routing, middleware, MCP server, ORM, background jobs. No hyper, no Tower; HTTP/2 and HTTP/3 framing via h2 and quinn."
homepage = "https://rws8.tech/"
readme = "README.md"
keywords = [
    "web-server",
    "reverse-proxy",
    "https",
    "http3",
    "acme",
]
categories = [
    "network-programming",
    "web-programming::http-server",
]
license = "MIT"
repository = "https://github.com/bohdaq/rust-web-server"

[package.metadata.binstall]
pkg-url = "{ repo }/releases/download/{ version }/rws-{ version }-{ target }{ archive-suffix }"
bin-dir = "rws-{ version }-{ target }/{ bin }{ binary-ext }"
pkg-fmt = "tgz"

[package.metadata.binstall.overrides.x86_64-pc-windows-msvc]
pkg-fmt = "zip"

[features]
acme = [
    "http2",
    "dep:rcgen",
    "dep:webpki-roots",
    "dep:libc",
    "dep:aws-lc-rs",
]
auth = [
    "dep:hmac",
    "dep:sha2",
]
auth-asymmetric = [
    "auth",
    "dep:p256",
    "dep:rand_core",
]
crypto = [
    "dep:argon2",
    "dep:rand_core",
    "dep:hmac",
    "dep:sha2",
    "dep:aes-gcm",
]
csrf = ["dep:rand_core"]
default = ["http3"]
http-client = [
    "dep:rustls",
    "dep:webpki-roots",
]
http1 = [
    "dep:ctrlc",
    "dep:libc",
]
http2 = [
    "dep:h2",
    "dep:rustls",
    "dep:tokio-rustls",
    "dep:tokio",
    "dep:bytes",
    "dep:http",
    "dep:webpki-roots",
    "dep:libc",
]
http3 = [
    "http2",
    "dep:quinn",
    "dep:h3",
    "dep:h3-quinn",
]
jobs = []
macros = ["dep:rws-macros"]
mailer = []
mimalloc = ["dep:mimalloc"]
model-mysql = [
    "dep:sqlx",
    "sqlx/mysql",
    "sqlx/runtime-tokio-rustls",
    "http2",
]
model-postgres = [
    "dep:sqlx",
    "sqlx/postgres",
    "sqlx/runtime-tokio-rustls",
    "http2",
]
model-sqlite = [
    "dep:sqlx",
    "sqlx/sqlite",
    "sqlx/runtime-tokio",
    "http2",
]
openapi = []
rewrite-regex = ["dep:regex"]
secrets = [
    "dep:hmac",
    "dep:sha2",
    "http-client",
]
serde = [
    "dep:serde",
    "dep:serde_json",
]
sso = [
    "dep:p256",
    "dep:sha2",
    "dep:rand_core",
    "dep:serde",
    "dep:serde_json",
    "http-client",
]
sso-saml = ["sso"]
sso-server = [
    "sso",
    "auth",
]
storage-azure = [
    "dep:hmac",
    "dep:sha2",
    "http-client",
]
storage-local = []
storage-s3 = [
    "dep:hmac",
    "dep:sha2",
    "http-client",
]
tera = [
    "dep:tera",
    "dep:serde",
    "dep:serde_json",
]
webhook = [
    "dep:hmac",
    "dep:sha2",
]

[lib]
name = "rust_web_server"
path = "src/lib.rs"

[[bin]]
name = "rws"
path = "src/main.rs"

[[example]]
name = "mcp_conformance"
path = "examples/mcp_conformance.rs"
test = true
required-features = ["http2"]

[[example]]
name = "mcp_gateway"
path = "examples/mcp_gateway.rs"
test = true
required-features = ["http2"]

[[example]]
name = "mcp_inventory"
path = "examples/mcp_inventory.rs"
test = true
required-features = [
    "macros",
    "serde",
    "sso",
]

[dependencies.aes-gcm]
version = "0.10"
optional = true

[dependencies.argon2]
version = "0.5"
features = ["password-hash"]
optional = true

[dependencies.aws-lc-rs]
version = "1"
optional = true

[dependencies.bytes]
version = "1"
optional = true

[dependencies.ctrlc]
version = "3"
optional = true

[dependencies.file-ext]
version = "12.0.0"

[dependencies.flate2]
version = "1"

[dependencies.h2]
version = "0.4"
optional = true

[dependencies.h3]
version = "0.0.8"
optional = true

[dependencies.h3-quinn]
version = "0.0.10"
optional = true

[dependencies.hmac]
version = "0.12"
optional = true

[dependencies.http]
version = "1"
optional = true

[dependencies.libc]
version = "0.2"
optional = true

[dependencies.mimalloc]
version = "0.1"
features = ["v3"]
optional = true
default-features = false

[dependencies.p256]
version = "0.14"
features = ["ecdsa"]
optional = true

[dependencies.quinn]
version = "0.11"
features = [
    "runtime-tokio",
    "rustls-aws-lc-rs",
    "bloom",
]
optional = true
default-features = false

[dependencies.rand_core]
version = "0.6"
features = ["getrandom"]
optional = true

[dependencies.rcgen]
version = "0.14"
features = [
    "pem",
    "aws_lc_rs",
]
optional = true
default-features = false

[dependencies.regex]
version = "1"
optional = true

[dependencies.rws-macros]
version = "17.28"
optional = true

[dependencies.serde]
version = "1"
features = ["derive"]
optional = true

[dependencies.serde_json]
version = "1"
optional = true

[dependencies.sha2]
version = "0.10"
features = ["oid"]
optional = true

[dependencies.sqlx]
version = "0.8"
optional = true
default-features = false

[dependencies.tera]
version = "1"
optional = true

[dependencies.tokio]
version = "1"
features = [
    "net",
    "rt-multi-thread",
    "macros",
    "io-util",
    "signal",
    "time",
]
optional = true

[dependencies.tokio-rustls]
version = "0.26"
optional = true

[dependencies.url-build-parse]
version = "12.1.0"

[dependencies.url-search-params]
version = "12.0.0"

[dev-dependencies.tokio]
version = "1"
features = [
    "test-util",
    "macros",
    "rt",
]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.rustls]
version = "0.23.46"
features = [
    "aws-lc-rs",
    "tls12",
    "logging",
    "std",
]
optional = true
default-features = false

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.webpki-roots]
version = "1.0.11"
optional = true

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.aws-lc-rs]
version = "1"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies.rcgen]
version = "0.14"
features = [
    "pem",
    "aws_lc_rs",
]
default-features = false

[target.'cfg(target_arch = "wasm32")'.dependencies.wasip2]
version = "2.0"

[lints.rust.unexpected_cfgs]
level = "warn"
priority = 0
check-cfg = ["cfg(fuzzing)"]