nodejs / nodejs/node

WASI stdio (stdin, stdout) API not very useful

Open
#52,614 8 comments 6 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request never-stale stale wasi
Dominant language
JavaScript
Stars
122k
Forks
37.3k
Avg merge
4d 2h
Merged PRs (30d)
283

Description

What is the problem this feature will solve?

Currently the WASI API only lets you give file descriptors for stdin, stdout and stderr. That's not very useful. In most cases I want to interact with these streams which doesn't seem possible - at least not without a ton of platform specific work - with just file descriptors.

What is the feature you are proposing to solve the problem?

You should be able to pass ReadableStream and WritableStream instead. You can do this when spawning subprocesses.

What alternatives have you considered?

Slightly ludicrously, spawning a new child process that just starts the WASI module and does nothing else seems to be the most reasonable workaround currently, though I haven't tried it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing WASI stdio API and the subprocess-spawning stream behavior described in the issue. Define how ReadableStream and WritableStream should replace or complement file descriptors, including compatibility and clear completion criteria.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, node.js
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.