ruby / ruby/ruby.wasm

Accessing files and directories?

Aperta
#408 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Lingua principale
Ruby
Stelle
875
Fork
68
Merge medio
9g 5h
PR unite (30g)
1

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Non viene indicato alcun file sorgente né alcun test. Inizia tracciando il modo in cui ruby.wasm espone l'accesso al filesystem WASI e il comportamento di Dir['*'] nella directory di lavoro corrente; determina le semantiche supportate per la lettura e la creazione. Il lavoro è completato quando le aspettative dell'issue sull'accesso ai file sono implementate e coperte da test appropriati, oppure quando le limitazioni sono documentate chiaramente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
ruby, wasm
Ambito
operating-systems
Tipo di issue
Funzionalità
Difficoltà
5/5
Tempo stimato
Più di una settimana
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.