Tracking issues of OpenDAL wasm32-unknown-unknown target support
- Dominant language
- Rust
- Stars
- 5.4k
- Forks
- 825
- Avg merge
- 1d 14m
- Merged PRs (30d)
- 127
Description
> WebAssembly (WASM) is a modern binary instruction format for a stack-based virtual machine. It is designed as a portable compilation target for high-level languages like C/C++ and Rust, enabling deployment on the web for client and server applications. WASM aims to enable near-native performance for web applications, providing a more efficient and secure alternative to traditional JavaScript. Its key features include fast loading times, efficient execution, and the ability to run alongside JavaScript, allowing developers to build complex client-side web applications that perform better than those written solely in JavaScript.
By adding WASM support for opendal, we will allow users to use `opendal` in targets like `wasm32-unknown-unknown`. In a short word, users can use `opendal` in web browser!
We have addressed most blockers by https://github.com/apache/incubator-opendal/pull/3796 and adding a basic test for s3 https://github.com/apache/incubator-opendal/pull/3802. It's time for us to move forward.

This tracking issue is used to track our current progress of wasm support. Welcome to join in us!
## Tasks
### Add OPFS support
After opendal is ready for WASM, we can start to work for opfs now!
- [x] https://github.com/apache/incubator-opendal/issues/2442
### Add support for more services
Please run the following command to check if opendal can build under `wasm32` arch:
```rust
cargo build --target wasm32-unknown-unknown --no-default-features --features=services-s3
```
Visit https://github.com/apache/incubator-opendal/pull/3796 for possible fix or ask directly in this issue.
It's possible that some services can't support wasm at all, like `fs`. Please also provide your feedback here. We will collect them into a seperate doc.
- [ ] alluxio
- [ ] atomicserver
- [x] azblob in https://github.com/apache/incubator-opendal/pull/3806
- [ ] azdls
- [ ] azfile
- [ ] b2
- [x] ~~cacache~~ (can't support)
- [ ] cloudflare_kv
- [ ] cos
- [ ] d1
- [ ] dashmap
- [ ] dbfs
- [ ] dropbox
- [x] ~~etcd~~ (can't support)
- [x] ~~foundationdb~~ (can't support)
- [x] ~~fs~~ (can't support)
- [ ] ftp
- [x] gcs: https://github.com/apache/incubator-opendal/pull/3816
- [x] gdrive in https://github.com/apache/incubator-opendal/pull/3808
- [ ] ghac
- [ ] gridfs
- [x] ~~hdfs~~ (can't support)
- [ ] http
- [ ] huggingface
- [ ] ipfs
- [ ] ipmfs
- [ ] libsql
- [ ] memcached
- [ ] memory
- [ ] mini_moka
- [ ] moka
- [x] ~~mongodb~~ (can't support)
- [x] ~~mysql~~ (can't support)
- [ ] obs
- [ ] onedrive
- [ ] oss
- [x] ~~persy~~ (can't support)
- [x] ~~postgresql~~ (can't support)
- [x] ~~redb~~ (can't support)
- [x] ~~redis~~ (can't support)
- [x] ~~rocksdb~~ (can't support)
- [x] s3 (supported in #3802)
- [ ] seafile
- [x] ~~sftp~~ (can't support)
- [x] ~~sled~~ (can't support)
- [x] ~~sqlite~~ (can't support)
- [ ] supabase
- [ ] swift
- [x] ~~tikv~~ (can't support)
- [ ] upyun
- [ ] vercel_artifacts
- [ ] webdav
- [ ] webhdfs
### Testing
- [ ] Integrate behavior test for wasm target
### Benchmark
- [ ] Add benchmarks for opendal wasm
### Existing issues
- [ ] `wasm-pack test --node` doesn't work for `s3_read_on_wasm`
- [x] #3809
Contributor guide
Research direction
This is a broad tracking issue with no specific file or entry point named. Choose one unchecked service, run the provided cargo build command for wasm32-unknown-unknown with its feature, and consult PR #3796 for context. Done means confirming support or documenting that the service cannot support WASM; testing and benchmark tasks remain separate work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, wasm
- Domain
- build-system, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100