Static file server and REST API in rust using hyper v1.1.0 and tokio
Features:
- toml configuration files
- any number HTTP 1.x or HTTP 2 servers using hyper, each listening on 1 configured TCP or UNIX socket
- structured logging with spans for incoming connections and requests
- static file server using hyper-staticfile
- precompressed static files (bz and/or gz)
- configurable rules list using regular expressions for cache control response headers on static files
- server connection tracking
- timeouts with graceful shutdown
- track connection age, requests per connection, configurable connection limit
- historical connection metrics
- generic
handlers::RequestHandler
async trait to handle requests- asynchronously run configured shell commands and return response as json
- static file handler
- connection info
- request info
- version info
When the release build is too slow on your Raspberry Pi: Use github actions to cross-compile.
This app runs in about 8 megabytes of resident memory (RSS) on a 64-bit Raspberry Pi.
$ ps -eo pid,pmem,rss,vsz,comm --sort -rss
PID %MEM RSS VSZ COMMAND
10791 0.8 7744 890832 rust-hyper-serv