ruby / ruby/ruby.wasm

Accessing files and directories?

オープン
#408 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Ruby
スター
875
フォーク
68
平均マージ
9日 5時間
マージ済み PR(30日)
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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

ソースファイルもテストも指定されていません。まず、ruby.wasm が WASI ファイルシステムへのアクセスをどのように公開しているか、また現在の作業ディレクトリで Dir['*'] がどのように動作するかを追跡し、サポートされている読み取りと作成のセマンティクスを特定してください。Issue のファイルアクセスに関する期待事項が実装され、適切なテストでカバーされるか、制限事項が明確に文書化されていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
ruby, wasm
領域
operating-systems
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。