feat(services): Add `wasi-fs` backend using `wasi:filesystem` interface
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia esaminando il backend services-fs esistente e le specifiche collegate wasi:filesystem e Preview 2. Verifica come wasi:filesystem/types, preopens e wasi:io/streams si mappano sul backend proposto, quindi esegui la build per wasm32-wasip2. Il lavoro è completato quando un backend services-wasi-fs può accedere ai file preaperti dall’host durante la compilazione per la destinazione.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
Add a new OpenDAL backend that leverages the wasi:filesystem interface for file operations. This enables OpenDAL to access the host filesystem when running as a WebAssembly component, with the host runtime (e.g., wasmtime, wasmer) providing the actual filesystem implementation.
Motivation
Currently, the services-fs backend cannot compile to wasm32-wasip2 because it depends on tokio's filesystem features, which are not supported on WASM targets.
However, WASM components can access the host filesystem through the standardized wasi:filesystem interface. A wasi-fs backend would:
- Enable filesystem access in WASM components — Components could read/write files preopened by the host runtime
- Complement existing backends —
memoryands3work on WASM, but there's no local filesystem option - Leverage existing WASI ecosystem — Runtimes like wasmtime already implement
wasi:filesystem
Proposed Implementation
A new services-wasi-fs feature/backend that:
- Imports
wasi:filesystem/typesandwasi:filesystem/preopensinterfaces - Uses
wasi:io/streamsfor read/write operations - Works with preopened directories provided by the host
- Compiles to
wasm32-wasip2target only (or conditional compilation)
Use Case
We're building WASM components that expose storage capabilities. We want to:
- Create an OpenDAL-based storage component
- Export
wasi:filesysteminterface for downstream consumers - Support multiple backends (memory, S3, and host filesystem)
Without a wasi-fs backend, components cannot access files that the host runtime preopens for them.
Research Notes
| Backend | WASM-compatible | Notes |
|---|---|---|
services-memory |
✅ | Works out of the box |
services-s3 |
✅ | Works with reqwest/reqsign |
services-fs |
❌ | Requires tokio fs (not WASM-compatible) |
services-wasi-fs |
🆕 | Proposed — uses wasi:filesystem imports |
Related
- WASI filesystem spec: https://github.com/WebAssembly/wasi-filesystem
- Preview 2 (Component Model): https://github.com/WebAssembly/WASI/blob/main/preview2/README.md
- Lingua principale
- Rust
- Stelle
- 5.5k
- Fork
- 869
- Merge medio
- 8h 2m
- PR unite (30g)
- 862
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di apache/opendal
-
bug(services/fs): deleting "/" removes the configured root directoryForse già presa @xgbtxy l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 81/100
apache/opendal#9635 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
core enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
apache/opendal#9572 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
fix(bindings/nodejs): reject negative and overflowing BigInt values in WriteOptions.chunk and Read/ReaderOptions.gapForse già presa @rohan4naik l’ha presa oggi. Apertabindings/nodejs bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 76/100
apache/opendal#9569 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bug(layers/throttle): throttle streaming ReadStream bytes instead of pre-charging ReadOptions::limit upper bounds on open()Forse già presa @Xuanwo l’ha presa oggi. Apertabug core
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
apache/opendal#9567 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
bindings/c bindings/dotnet bindings/go bindings/java bindings/python bindings/ruby core integrations/object_store release release-blocker services/azblob services/azdls services/dropbox services/gcs_grpc services/git services/hf3fs services/redis services/remotestorage services/s3 website
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
apache/opendal#9560 · 3 commenti · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di apache/opendal
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
Choochmeque/tauri-plugin-webdriver#134 ·
I maintainer di solito rispondono entro 17 giorni
-
bug(c-sdk): boxlite_box_exec does not check runtime liveness before dispatching streaming execApertabug rust SDK & CLI & REST API
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
boxlite-ai/boxlite#3292 ·
I maintainer di solito rispondono entro 1 giorno
-
Android bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
anefzaoui/misterdownloadmanager#2516 ·
I maintainer di solito rispondono entro 1 giorno
-
editor ui
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
state:triage tech-debt
Difficoltà 2/5 1-3 ore Idoneità per principianti 89/100
agent8-cash/ethpayserver#731 ·
I maintainer di solito rispondono entro 1 giorno