#wasi #wasi-http

waki

HTTP client and server library for WASI

10 releases (4 breaking)

0.5.1 Dec 12, 2024
0.5.0 Nov 20, 2024
0.4.2 Oct 31, 2024
0.3.2 Oct 12, 2024
0.1.0 Jun 5, 2024

#1073 in WebAssembly

Download history 131/week @ 2025-12-23 18/week @ 2025-12-30 42/week @ 2026-01-06 57/week @ 2026-01-13 54/week @ 2026-01-20 71/week @ 2026-01-27 119/week @ 2026-02-03 33/week @ 2026-02-10 57/week @ 2026-02-17 118/week @ 2026-02-24 120/week @ 2026-03-03 90/week @ 2026-03-10 94/week @ 2026-03-17 216/week @ 2026-03-24 159/week @ 2026-03-31 186/week @ 2026-04-07

662 downloads per month

Apache-2.0

43KB
945 lines

waki

HTTP client and server library for WASI.

Send a request:

let resp = Client::new()
    .post("https://httpbin.org/post")
    .connect_timeout(Duration::from_secs(5))
    .send()?;

println!("status code: {}", resp.status_code());

Writing an HTTP component:

use waki::{handler, ErrorCode, Request, Response};

#[handler]
fn hello(req: Request) -> Result<Response, ErrorCode> {
    Response::builder().body(b"Hello, WASI!").build()
}

Dependencies

~1.2–2.3MB
~43K SLoC