[package]
name = "rust-web-server"
version = "18.2.0"
authors = ["Bohdan Tsap <bohdan.tsap@tutanota.com>"]
repository = "https://github.com/bohdaq/rust-web-server"
homepage = "https://rws8.tech/"
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."
edition = "2021"
rust-version = "1.88"
license = "MIT"
keywords = ["web-server", "reverse-proxy", "https", "http3", "acme"]
categories = ["network-programming", "web-programming::http-server"]
[workspace]
members = ["rws-macros", "rws-wasm-shim"]
exclude = ["fuzz"]
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }
[lib]
name = "rust_web_server"
path = "src/lib.rs"
[[bin]]
name = "rws"
path = "src/main.rs"
[[example]]
name = "hello"
required-features = ["http2"]
test = true
[[example]]
name = "rest_api"
required-features = ["http2", "serde"]
test = true
[[example]]
name = "static_site"
required-features = ["http2"]
test = true
[[example]]
name = "reverse_proxy"
required-features = ["http2"]
test = true
[[example]]
name = "sse_ticker"
required-features = ["http2"]
test = true
[[example]]
name = "upload"
required-features = ["http2"]
test = true
[[example]]
name = "mcp_inventory"
required-features = ["macros", "serde", "sso"]
test = true
[[example]]
name = "mcp_gateway"
required-features = ["http2"]
test = true
[[example]]
name = "mcp_conformance"
required-features = ["http2"]
test = true
[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]
default = ["http3", "brotli", "zstd"]
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"]
http-client = ["dep:rustls", "dep:webpki-roots"]
brotli = ["dep:brotli"]
zstd = ["dep:zstd"]
acme = ["http2", "dep:rcgen", "dep:webpki-roots", "dep:libc", "dep:aws-lc-rs"]
serde = ["dep:serde", "dep:serde_json"]
auth = ["dep:hmac", "dep:sha2"]
auth-asymmetric = ["auth", "dep:p256", "dep:rand_core"]
macros = ["dep:rws-macros"]
mimalloc = ["dep:mimalloc"]
tera = ["dep:tera", "dep:serde", "dep:serde_json"]
model-sqlite = ["dep:sqlx", "sqlx/sqlite", "sqlx/runtime-tokio", "http2"]
model-postgres = ["dep:sqlx", "sqlx/postgres", "sqlx/runtime-tokio-rustls", "http2"]
model-mysql = ["dep:sqlx", "sqlx/mysql", "sqlx/runtime-tokio-rustls", "http2"]
crypto = ["dep:argon2", "dep:rand_core", "dep:hmac", "dep:sha2", "dep:aes-gcm"]
csrf = ["dep:rand_core"]
mailer = []
sso = ["dep:p256", "dep:sha2", "dep:rand_core", "dep:serde", "dep:serde_json", "http-client"]
sso-server = ["sso", "auth"]
sso-saml = ["sso"]
jobs = []
storage-local = []
storage-s3 = ["dep:hmac", "dep:sha2", "http-client"]
storage-azure = ["dep:hmac", "dep:sha2", "http-client"]
openapi = []
webhook = ["dep:hmac", "dep:sha2"]
rewrite-regex = ["dep:regex"]
secrets = ["dep:hmac", "dep:sha2", "http-client"]
[dependencies]
ctrlc = { version = "3", optional = true }
mimalloc = { version = "0.1", optional = true, default-features = false, features = ["v3"] }
libc = { version = "0.2", optional = true }
file-ext = "12.0.0"
flate2 = "1"
brotli = { version = "9", optional = true }
zstd = { version = "0.14.3", optional = true }
url-search-params = "12.0.0"
url-build-parse = "12.1.0"
tokio = { version = "1", features = ["net", "rt-multi-thread", "macros", "io-util", "signal", "time"], optional = true }
rcgen = { version = "0.14", default-features = false, features = ["pem", "aws_lc_rs"], optional = true }
tokio-rustls = { version = "0.26", optional = true }
h2 = { version = "0.4", optional = true }
bytes = { version = "1", optional = true }
http = { version = "1", optional = true }
quinn = { version = "0.11", default-features = false, features = ["runtime-tokio", "rustls-aws-lc-rs", "bloom"], optional = true }
h3 = { version = "0.0.8", optional = true }
h3-quinn = { version = "0.0.10", optional = true }
serde = { version = "1", features = ["derive"], optional = true }
serde_json = { version = "1", optional = true }
hmac = { version = "0.12", optional = true }
sha2 = { version = "0.10", features = ["oid"], optional = true }
p256 = { version = "0.14", features = ["ecdsa"], optional = true }
aws-lc-rs = { version = "1", optional = true }
rws-macros = { path = "rws-macros", version = "17.28", optional = true }
tera = { version = "1", optional = true }
sqlx = { version = "0.8", default-features = false, optional = true }
argon2 = { version = "0.5", features = ["password-hash"], optional = true }
rand_core = { version = "0.6", features = ["getrandom"], optional = true }
aes-gcm = { version = "0.10", optional = true }
regex = { version = "1", optional = true }
[dev-dependencies]
tokio = { version = "1", features = ["test-util", "macros", "rt"] }
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
rcgen = { version = "0.14", default-features = false, features = ["pem", "aws_lc_rs"] }
aws-lc-rs = "1"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
webpki-roots = { version = "1.0.11", optional = true }
rustls = { version = "0.23.46", default-features = false, features = ["aws-lc-rs", "tls12", "logging", "std"], optional = true }
[target.'cfg(windows)'.dependencies]
windows-service = "0.8.1"
[target.'cfg(target_arch = "wasm32")'.dependencies]
wasip2 = "2.0"