simoom 0.1.0

simoom: a small, fast, secure embeddable HTTP/1.1, HTTP/2 and HTTP/3 server.
Documentation
[package]
name = "simoom"
description = "simoom: a small, fast, secure embeddable HTTP/1.1, HTTP/2 and HTTP/3 server."
version.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
authors.workspace = true
rust-version.workspace = true
keywords = ["http", "http2", "http3", "server", "quic"]
categories = ["web-programming::http-server", "network-programming", "embedded"]
homepage = "https://github.com/Cameleering/simoom"
documentation = "https://docs.rs/simoom"
readme = "../../README.md"

[lints]
workspace = true

[dependencies]
simoom-rt = { path = "../simoom-rt", version = "0.1.0", default-features = false }
# Per-thread CPU time for the stall watchdog.
simoom-sys = { path = "../simoom-sys", version = "0.1.0", default-features = false }
# Always linked for the Date header, header validation and base64; its request parser is linked
# only with the `http1` feature, its WebSocket codec only with `websocket`.
simoom-http1 = { path = "../simoom-http1", version = "0.1.0", default-features = false }
# Its `connect-protocol` and `keepalive` features come with `websocket-h2` and `h2-keepalive`.
simoom-h2 = { path = "../simoom-h2", version = "0.1.0", optional = true, default-features = false }
simoom-tls = { path = "../simoom-tls", version = "0.1.0", optional = true, default-features = false }
simoom-quic = { path = "../simoom-quic", version = "0.1.0", optional = true, default-features = false }
simoom-h3 = { path = "../simoom-h3", version = "0.1.0", optional = true }
simoom-compress = { path = "../simoom-compress", version = "0.1.0", optional = true }

[features]
default = ["http1", "http2", "websocket", "io-uring", "watchdog", "guard", "idle-trim"]
# HTTP/1.1 over TCP: keep-alive, pipelining, chunked bodies, 100-continue.
http1 = []
# HTTP/2: h2c with prior knowledge and `Upgrade: h2c`, and h2 over TLS through ALPN.
http2 = ["dep:simoom-h2"]
# TLS 1.3 on TCP listeners; ALPN chooses h2 or http/1.1.
tls = ["dep:simoom-tls", "simoom-tls/rsa"]
# The remaining TLS key types and suite: ECDSA P-384 and Ed25519 certificates, and
# ChaCha20-Poly1305. `tls` alone has X25519, P-256, RSA and AES-GCM, which covers the
# certificates people actually deploy.
tls-extra = ["tls", "simoom-tls/p384", "simoom-tls/ed25519", "simoom-tls/chacha20"]
# HTTP/3 over QUIC on UDP listeners (needs TLS 1.3).
http3 = ["tls", "dep:simoom-quic", "dep:simoom-h3", "simoom-rt/udp"]
# WebSocket upgrades (RFC 6455) on HTTP/1.1.
websocket = ["http1", "simoom-http1/websocket"]
# The stall watchdog (`Limits::inline_budget`): finds inline handlers that hold a loop thread
# and moves their route to the offload pool. On by default; an edge build that leaves it out
# saves its code, and `inline_budget` and the stall limits are then ignored.
watchdog = []
# Overload and slow-client guards (K5, K6): admission by backpressure
# (`Limits::max_pending_per_loop`, `Limits::pending_503`), slow request heads kept open until the
# server is short of connections (`Limits::slow_head_limit`) and the per-IP reconnect rate
# (`Limits::reconnect_rate`). On by default; an edge build that leaves it out saves their code,
# those limits are then ignored and slow heads close at `head_timeout`.
guard = []
# Memory returned after bursts (simoom-rt `idle-trim`): an idle loop frees cached buffers and
# asks the allocator to give free memory back to the OS. On by default.
idle-trim = ["simoom-rt/idle-trim"]
# Alias of `websocket`.
ws = ["websocket"]
# WebSocket over HTTP/2 (RFC 8441, extended CONNECT): `Reply::websocket` also accepts
# `:protocol websocket` streams. Not in `default` or `full`, which keep their size budgets.
websocket-h2 = ["websocket", "http2", "simoom-h2/connect-protocol"]
# HTTP/2 PING keepalive (`Limits::h2_keepalive`): finds clients that vanished behind
# long-lived streams. Without it those limits are ignored.
h2-keepalive = ["http2", "simoom-h2/keepalive"]
# Response compression (gzip, deflate) negotiated from `Accept-Encoding`
# (`Builder::compression`), and request body decoding (`Request::decoded_body`).
compression = ["dep:simoom-compress"]
# Brotli (`br`) and zstd responses and request decoding, on top of `compression`.
brotli = ["compression", "simoom-compress/brotli"]
zstd = ["compression", "simoom-compress/zstd"]
# WebSocket over HTTP/3 (RFC 9220, extended CONNECT): `Reply::websocket` also accepts
# `:protocol websocket` streams on QUIC.
websocket-h3 = ["websocket", "http3"]
# WebSocket permessage-deflate (RFC 7692, `Builder::websocket_deflate`).
ws-deflate = ["websocket", "simoom-http1/permessage-deflate"]
# Server helpers (each its own feature): `multipart/form-data` parsing (`simoom::multipart`),
# cookies (`simoom::cookie`), conditional and range requests (`simoom::conditional`), CORS
# (`simoom::cors`).
multipart = []
cookies = []
conditional = []
cors = []
# Authentication helpers (`simoom::auth`): Basic, Digest (RFC 7616, signed nonces, replay
# protection, rspauth), Bearer extraction and the `Auth::wrap` service. Hashes and HMAC from
# simoom-tls (MD5 from its `legacy` module).
auth = ["dep:simoom-tls", "simoom-tls/legacy"]
full = ["http1", "http2", "http3", "tls", "tls-extra", "tls-client", "websocket", "io-uring", "watchdog", "guard", "idle-trim"]
# The TLS client (simoom-tls's, and simoom-quic's QUIC client). The server never needs it; the
# TLS and HTTP/3 tests use it.
tls-client = ["tls", "simoom-tls/client", "simoom-quic?/client"]
# The Linux io_uring back end (`Backend::IoUring`; without it that falls back to epoll). On by
# default for servers; an edge build (`--no-default-features --features http1`) leaves it out.
io-uring = ["simoom-rt/io-uring"]

[[example]]
name = "h3_bulk"
required-features = ["http3", "tls-client"]

[[example]]
name = "interop_server"
required-features = ["http3", "tls-extra"]

[[test]]
name = "watchdog"
required-features = ["watchdog"]