Skip to content

C binding: wasi std out to string #4372

Open
@ShuP1

Description

@ShuP1

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::pipe::WritePipe and ReadPipe on the rust side to implemented a binding in c-api crate.

Alternatives

Export some basic filesystem operations in c binding

Metadata

Metadata

Assignees

No one assigned

    Labels

    wasmtime:c-apiIssues pertaining to the C API.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions