! 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
Theodore Brockman has marked this topic as resolved.
I'm not sure why I assumed
Request::consume_bodyimmediately read the body
Hmm..."consume" is a little misleading there isn't it?
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