apache / opendal

Apache OpenDAL: access data freely.
https://opendal.apache.org
Apache License 2.0
3.39k stars 474 forks source link

Add Origin Private File System support #2442

Open stormshield-guillaumed opened 1 year ago

stormshield-guillaumed commented 1 year ago

There is a recent Web API providing access to a file system private to the origin of the page. This could be useful for a cross platform application targeting desktop and WASM, using either the fs backend on desktop or the new backend on WASM.

It is not a small task, but maybe some people could find this interesting.

Xuanwo commented 1 year ago

Interesting! I plan to make OpenDAL work in wasm first and than add OPFS support.

Xuanwo commented 10 months ago

We are ready for this now!

stormshield-guillaumed commented 10 months ago

That's great news ! Unfortunately, AFAIK, there is no high level API for interacting with OPFS in Rust at the moment, but the building blocks are in web-sys. The addition of OPFS was discussed in https://github.com/rustwasm/wasm-bindgen/issues/2868 if anyone is interested.

Xuanwo commented 10 months ago

We need to wait for https://github.com/rustwasm/wasm-bindgen/issues/3755

Xuanwo commented 6 months ago

Hello, everyone. This issue has been submitted as this year's OSPP project. I hope we can push this issue forward.

Xuanwo commented 6 months ago

Apply for this project: https://summer-ospp.ac.cn/org/prodetail/241110348

Goal

Add Origin Private File System (OPFS) support for opendal so that users can use opfs in wasm runtime or browser.

The usage will look like:

let op = Operator::via_map(Scheme::Opfs, map)?;
let bs = op.read("path/to/file").await?;

opfs should only be provided in wasm32 target.

Requirement

Mentorship

Mentor: @PsiACE Discussion: mailing list and discord

LYZJU2019 commented 4 months ago

I'm interested!

Xuanwo commented 1 month ago

cc @PsiACE and @LYZJU2019, any updates on this?