Case Study
Rustra — Rust + Wasm Web Framework
A multi-threaded web framework written in Rust with WebAssembly, built to learn the internals of HTTP servers, thread pools, and browser-side Rust.
RustWebAssemblyHTTPConcurrency
Overview
Rustra is a multi-threaded web framework written from scratch in Rust, with a Wasm surface for running Rust in the browser. Built as a learning project to understand the pieces that higher-level frameworks (Actix, Axum, Rocket) abstract away.
Source: github.com/5uf/rustra
Why Build Another Framework
- Using a framework ≠ understanding it. I wanted hands-on experience with TCP listeners, request parsing, thread pools, and worker scheduling at the code level.
- Wasm is a credible deployment target for performance-critical browser code; wiring it up end-to-end surfaces the rough edges.
What’s Inside
Server
- Custom TCP listener accepting HTTP requests.
- Hand-rolled request/response parsing — no hyper, no tokio abstractions to hide behind.
- Thread-pool model: a pool of worker threads pulls jobs off a shared channel so the accept loop stays non-blocking.
WebAssembly
- Rust modules compiled to Wasm to run the same logic in the browser.
- Exercised the
wasm-bindgen/wasm-packtoolchain for JS interop.
What It Demonstrates
- Low-level Rust: ownership,
Send/Sync, channels, and thread-safe shared state. - Systems thinking: how a web server actually accepts, parses, dispatches, and responds to a request.
- Willingness to go a layer deeper than the docs.
Status
Personal project. Not production-grade — real deployments should use a battle-tested framework — but the exercise of building it was the point.