bytecodealliance / bytecodealliance/wasm-tools
Streaming writing/encoding with io::Write
- Dominant language
- Rust
- Stars
- 1.8k
- Forks
- 351
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 46
Description
Similar to [this prior question](https://github.com/bytecodealliance/wasm-tools/issues/328) on streaming reading with `wasmparser`, I am wondering if it is possible to do *streaming encoding* with `wasm-encoder`?
Right now, the central trait seems to be [`wasm_encoder::Encode`](https://docs.rs/wasm-encoder/latest/wasm_encoder/trait.Encode.html), which takes the sink as a `&mut Vec`. Would it be possible to get rid of that trait and instead serialize to any `impl io::Write`? That should strictly be more general, as `io::Write` is already implemented in the standard library for `Vec` anyway.
Thanks a lot for the great selection of crates!
Contributor guide
Assessment
This issue has not been assessed yet.