nodejs / nodejs/node

WASI stdio (stdin, stdout) API not very useful

未关闭
#52,614 8 条评论 6 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

feature request never-stale stale wasi
主要语言
JavaScript
星标
122k
派生
37.4k
平均合并
4 天 3 小时
30 天内合并 PR
272

描述

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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

首先审查现有的 WASI stdio API,以及 issue 中描述的生成子进程时的流行为。定义 ReadableStream 和 WritableStream 应如何替代或补充文件描述符,包括兼容性和明确的完成标准。

由索引模型根据 Issue 内容生成。

评估

技术栈
javascript, node.js
领域
api, backend
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
停滞
描述清晰度
需要澄清
新手友好度
25/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。