Accessing files and directories?
还没有人认领这个 Issue。
- 主要语言
- Ruby
- 星标
- 875
- 派生
- 68
- 平均合并
- 9 天 5 小时
- 30 天内合并 PR
- 1
描述
It seems the current working directory is /, in ruby.wasm. By default this appears
to be empty - I tried via Dir['*'].
I also don't seem to be able to create anything, or read from files.
I'd love to be able to do both, but reading from a file is more important. My initial
idea was to "componentize" my smaller gems into Strings that can be evaluated
via ruby.wasm. But if I can not read any file or find them then this strategy does
not work.
Is there a way to query a file's content still? Even javascript has that option available
at the least if you e. g. place a .js file onto the webserver and then load it locally.
Right now I am not sure how to do this via ruby.wasm which kind of limits the way
I can use it. At any rate, thank you for reading this.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
未指定源文件或测试。首先跟踪 ruby.wasm 如何公开 WASI 文件系统访问,以及 Dir['*'] 在当前工作目录中的行为;确定支持的读取和创建语义。只有实现了 issue 对文件访问的预期,并通过适当的测试覆盖,或明确记录了限制,才算完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- ruby, wasm
- 领域
- operating-systems
- Issue 类型
- 功能
- 难度
- 5/5
- 预计耗时
- 一周以上
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100