bytecodealliance / bytecodealliance/wit-bindgen

Cannot precisely control read capacity of `stream` in Rust

Open
#1,300 0 comments 0 reactions 0 assignees View on GitHub
async gen-rust
Dominant language
Rust
Stars
1.5k
Forks
286
Avg merge
6h 32m
Merged PRs (30d)
19

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.