bytecodealliance / bytecodealliance/wasmtime
C binding: wasi std out to string
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 126
Description
#### Feature
Rust library can bind WritePipe to WasiCtx stdout which can be far simpler and effective than OS files went dealing with multiple short-lived instances.
It is not currently possible with C/C++ bindings
#### Benefit
- Avoid useless error-prone and slow interactions by filesystem
- Allow simpler integration in freestanding targets
#### Implementation
Leverage existing [wasi_common](https://docs.rs/wasi-common/0.38.1/wasi_common/index.html)::[pipe](https://docs.rs/wasi-common/0.38.1/wasi_common/pipe/index.html)::[WritePipe](https://docs.rs/wasi-common/0.38.1/wasi_common/pipe/struct.WritePipe.html#) and ReadPipe on the rust side to implemented a binding in `c-api` crate.
#### Alternatives
Export some basic filesystem operations in c binding
Contributor guide
Assessment
This issue has not been assessed yet.