wit-bindgen
wit-bindgen copied to clipboard
Cannot precisely control read capacity of `stream` in Rust
The stream type in WIT (note no type parameter) is modeled in Rust as StreamReader<()>. This takes a Vec<()> to read into but the capacity of Vec<()> is always usize::MAX. This means there's no way to precisely control the capacity of reads of stream in Rust.