Stream: wasi

Topic: ✔ wasi-http body (de/)compression


view this post on Zulip Theodore Brockman (Dec 09 2025 at 23:00):

! I'm not sure why I assumed Request::consume_body immediately read the body, my apologies :blushing:

If we're talking about a custom host embedding of Wasmtime

This is the case! But I see what you both mean about composition, I'll elect to do that instead

view this post on Zulip Notification Bot (Dec 09 2025 at 23:00):

Theodore Brockman has marked this topic as resolved.

view this post on Zulip Lann Martin (Dec 10 2025 at 13:21):

I'm not sure why I assumed Request::consume_body immediately read the body

Hmm..."consume" is a little misleading there isn't it?

view this post on Zulip Theodore Brockman (Dec 10 2025 at 19:30):

Hmm..."consume" is a little misleading there isn't it?

Oh absolutely, but I also should've known better at this point, I knew it returned a StreamReader -- I think on my first reading I assumed the decoder task executed immediately to completion -- and not that it would block until pipe_rx actually reads the first chunk (I believe this is what I missed? not sure whether executor behavior for wit_bindgen::spawn also comes into play here) -- which is very elegant in how much it accomplishes while remaining so simple.

Until I get better at reading and understanding Rust code I'll probably make a few more mistakes like this though, appreciate the patience :grimacing:


Last updated: Jan 09 2026 at 13:15 UTC