4 ms·
I also wanted a Rust web server with no magic, that uses async internally, and lets me write threaded request handlers. None existed, so I wrote one: https://
by mleonhard 4y ago
I also wanted a Rust web server with no magic, that uses async internally, and lets me write threaded request handlers. None existed, so I wrote one:
https://crates.io/crates/servlin https://crates.io/crates/servlin
Servlin contains no unsafe code. I picked dependencies to have as little unsafe code as possible. I wrote some unsafe-free deps: safina (async runtime), safe-regex, fixed-buffer, permit, temp-dir, and temp-file. I plan to replace other unsafe deps: url, async-net, and serde. Eventually Servlin's only unsafe will be in the standard library and `polling` crate.
Servlin supports single-file webapp deployments by including web assets in the binary. I plan to develop Servlin until it is as strong as nginx and can run reliably with no load balancer. And someday a good Rust unikernel will exist and we will run Servlin binaries directly on hardware. That will be the world's shortest, most secure, and most performant web stack.
Please contact me if you would like to help improve Servlin.