#wasi #web-server #waki

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

#612 in WebAssembly

Download history 107/week @ 2024-12-18 48/week @ 2024-12-25 122/week @ 2025-01-01 236/week @ 2025-01-08 321/week @ 2025-01-15 217/week @ 2025-01-22 174/week @ 2025-01-29 170/week @ 2025-02-05 230/week @ 2025-02-12 280/week @ 2025-02-19 236/week @ 2025-02-26 212/week @ 2025-03-05 184/week @ 2025-03-12 312/week @ 2025-03-19 121/week @ 2025-03-26 207/week @ 2025-04-02

878 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.2MB
~44K SLoC