> I can't rewrite the world, an async runtime and web server are just too difficult and take to long for me to justify writing for a project like this (although I should eventually just for a better understanding).<p>I did this and it only solved half of the bloat:<p><a href="https://crates.io/crates/safina" rel="nofollow">https://crates.io/crates/safina</a> - Safe async runtime, 6k lines<p><a href="https://crates.io/crates/servlin" rel="nofollow">https://crates.io/crates/servlin</a> - Modular HTTP server library, threaded handlers and async performance, 8k lines.<p>I use safina+servlin and 1,000 lines of Rust to run <a href="https://www.applin.dev" rel="nofollow">https://www.applin.dev</a>, on a cheap VM. It serves some static files, a simple form, receives Stripe webooks, and talks to Postgres and Postmark. It depends on some heavy crate trees: async-fs, async-net, chrono, diesel, rand (libc), serde_json, ureq, and url.<p>2,088,283 lines of Rust are downloaded by `cargo vendor` run in the project dir.<p>986,513 lines using <a href="https://github.com/coreos/cargo-vendor-filterer">https://github.com/coreos/cargo-vendor-filterer</a> to try to download only Linux deps with `cargo vendor-filterer --platform=x86_64-unknown-linux-gnu`. This still downloads the `winapi` crate and other Windows crates, but they contain only 22k lines.<p>976,338 lines omitting development dependencies with `cargo vendor-filterer --platform=x86_64-unknown-linux-gnu --keep-dep-kinds=normal`.<p>754,368 lines excluding tests with `cargo vendor-filterer --platform=aarch64-apple-darwin --exclude-crate-path='*#tests' deps.filtered`.<p>750k lines is a lot to support a 1k-line project. I guess I could remove the heavy deps with another 200 hours of work, and might end up with some lean crates. I've been waiting for someone to write a good threaded Rust Postgres client.