WasmEdge Hyper Demo is a collection of example HTTP servers and clients built in Rust and compiled to WebAssembly for execution in the WasmEdge Runtime.
The project addresses the need for efficient asynchronous network operations in WebAssembly environments. It demonstrates how to use the hyper and tokio libraries to build async HTTP clients and servers that run in WASM, solving the problem that synchronous network requests would be inefficient in cloud computing and distributed scenarios. The approach ports tokio into WebAssembly by using patched versions of tokio, hyper, mio, and socket2 for WASI compatibility, allowing developers to write async Rust code that compiles to WASM and executes via WasmEdge.
Developers should adopt this project if they need to run async HTTP workloads in WebAssembly or want to migrate existing tokio-dependent Rust projects to WASM. It suits cloud computing scenarios where efficient asynchronous I/O is critical. The project includes multiple example implementations: a basic HTTP client, an HTTP server using hyper, an HTTP server using the Axum framework, and an HTTP server with TensorFlow integration. Docker support is provided for quick experimentation without requiring local Rust or WasmEdge installation. The README does not compare this approach to alternative solutions for async WASM networking.
The project maintains examples across multiple HTTP frameworks and use cases, indicating active exploration of different architectural patterns. Build and runtime instructions are clearly documented with specific version requirements for Rust, WasmEdge, and the patched dependencies. The project tracks compatibility across its core components and provides both Docker-based and manual setup paths for users with different preferences.