Xuanwo
Xuanwo
Current progress: ```shell :( NAPI_TARGET=wasm32-unknown-unknown pnpm run build > [email protected] build /home/xuanwo/Code/apache/incubator-opendal/bindings/nodejs > napi build --platform --features "${NAPI_FEATURES:-}" --target "${NAPI_TARGET:-}" --release --js generated.js --dts generated.d.ts && node ./scripts/header.js ... Compiling...
Supporting `wasm32-wasi` is cool, but it seems unrelated to the goal of running in a browser. For example, supporting the use case like [remotely-save](https://github.com/remotely-save/remotely-save)
> If we just want to make the opendal useable in electron. I think it already be done It seems more complex while on mobile as described in https://github.com/remotely-save/remotely-save/blob/master/docs/browser_env.md
Hi, @fyears, I'm now using `remotely-save`! Fantastic job! Let's see how we can improve it by using opendal.
Following the discussion at https://github.com/napi-rs/napi-rs/issues/1794, it seems we just need to wait for napi 3.0 and add `wasm32` target during release.
cc @suyanhanx, after this implemented, we will need to rename `bindings/nodejs` to `bindings/js`?
> Is it something like changing the [`main`/integrations/dav-server/src/file.rs](https://github.com/apache/opendal/blob/main/integrations/dav-server/src/file.rs?rgh-link-date=2024-02-16T18%3A48%3A13Z) No, I believe this change requires us to store a state in `WebdavFile` that includes both `Reader` and `Writer`, allowing us to...
To handle read/write correctly, we need: - Handle `OpenOptions` correctly to decide open reader or writer - Implement `flush` correctly to make sure writer closed cc @G-XD, would you like...
Has been fixed.
hi, @krinart please allow me to edit this PR so we can resolve the conflicts and merge it.