Stream: wasi

Topic: wasi-http(-proxy) wrapper APIs


view this post on Zulip Chad Kimes (Feb 21 2024 at 17:00):

I was able to get up and running with making outbound HTTP requests using the HTTP components, but given some things like the mechanics of needing to drop streams before sending the body or all of the manual request setup it seems like the low-level API is not incredibly friendly for general use cases. Are there any example implementations of JS fetch-like or Rust reqwest-like libraries that provide simpler APIs?

view this post on Zulip Joel Dice (Feb 21 2024 at 17:10):

I believe @Till Schneidereit has implemented fetch for JS, and @Lann Martin has done some work porting Hyper. I've done some work integrating wasi-http with Python's asyncio (example), but haven't tried to port an existing Python HTTP library yet.

Contribute to lann/wasi-hyperium development by creating an account on GitHub.

view this post on Zulip Till Schneidereit (Feb 22 2024 at 17:56):

correct, I have a fairly compliant implementation of fetch that'll be public very soon

view this post on Zulip Till Schneidereit (Feb 22 2024 at 17:57):

more generally, I agree that wasi-http is too complex to use in its raw form. I hope that's something we can address in the future, and potentially by introducing higher-level APIs in addition

view this post on Zulip Thomas Aubry (Oct 02 2024 at 17:01):

Is there an on-going work to create a JS fetch-like or Rust reqwest-like libraries to provide a simpler API ?
I'm trying to find a simple way to run wasi module to fetch some API

view this post on Zulip Milan (Oct 02 2024 at 19:48):

When using wasi-http the stream based 0.3 api will be a pretty nice api out of the box though I bet communities in each language will want to use what's common there on top still (like fetch, reqwest, curl, etc)

Contribute to WebAssembly/wasi-http development by creating an account on GitHub.

view this post on Zulip Pat Hickey (Oct 02 2024 at 20:41):

@Yoshua Wuyts has this Rust crate that provides a higher level api on top of wasi-http 0.2: https://github.com/yoshuawuyts/wasm-http-tools/tree/main/crates/wasi-http-client

Rust tooling to use Wasm Components over HTTP. Contribute to yoshuawuyts/wasm-http-tools development by creating an account on GitHub.

Last updated: Dec 23 2024 at 12:05 UTC