Closed SionoiS closed 2 years ago
Seems like Tokio can't be compiled for wasm32-unknown-unknown because of mio dependency, which is a big deal...
I will probably create a small ipfs api for wasm for my own use, if I even can.
@SionoiS I'm also looking to use ipfs client in wasm. Did you find a solution?
Seems tokio is mainly used with hyper backend, so the reqwest backend should be a possible solution, no?
Edit: Found this crate which compiles successfully to wasm. Some more testing needed though :thinking: https://lib.rs/crates/semtexzv-ipfsapi
@tennox
https://lib.rs/crates/semtexzv-ipfsapi Not async which is weird when used on other targets.
My code is at https://github.com/Defluencer/rust-defluencer/tree/develop/ipfs-api Not published though.
@tennox
https://lib.rs/crates/semtexzv-ipfsapi Not async which is weird when used on other targets.
I think it is async 🧐 Started forking it to add dag support...
My code is at https://github.com/Defluencer/rust-defluencer/tree/develop/ipfs-api Not published though.
...but thanks for this it's a good reference 😎
The best would be to implement a backend with reqwest. I may be more feasible than last year.
I don't know if you got time to look into it.
The one from @semtexzv is with reqwest https://docs.rs/semtexzv-ipfsapi/latest/src/semtexzv_ipfsapi/pubsub.rs.html#79-87 🧐
I meant to say update rust-ipfs-api to include a backend that compile to wasm.
Oh , now i get it! that's actually an intruiging idea 🤔
Opening this issue for tracking and to help me remember caveats.
https://github.com/seanmonstar/reqwest/issues/1141 https://github.com/seanmonstar/reqwest/pull/1151 https://github.com/seanmonstar/reqwest/pull/1020 https://github.com/seanmonstar/reqwest/pull/1013
Will have to wait for crate split #43, async multipart #58, and reqwest support #69.