dariusc93 / rust-ipfs

The InterPlanetary File System (IPFS), implemented in Rust.
Apache License 2.0
36 stars 7 forks source link

Make rust-ipfs more platform agnostic #6

Open dariusc93 opened 1 year ago

dariusc93 commented 1 year ago

From where it stands, it seems that rust-ipfs is not exactly platform agnostic in a sense where it could run on every platform without an issue (mostly around wasm). rust-libp2p is platform agnostic, although testing may need to be done around wasm, wasi, etc., but have not seen many reports of issues on those platforms while rust-ipfs, being directly tied in with tokio, which does not support wasm completely, would likely have trouble running on such platforms.

Platforms that rust-ipfs can run on:

What should be done in the future:

Notes:

  1. Under default configuration, DNS would not operate on android due to its attempt to locate /etc/resolve.conf. As a result, we have to check for the target os and use the following lines to use the default dns (which I believe would be google dns)
  2. We can use idb, or gluesql for the data and block store when targetting wasm to make it easier on us.
  3. We may want to utilize send_wrapper when handling any wasm32 libraries as many of them that interact with bindings will not support Send or Sync.
tennox commented 1 year ago

Tip: Could be an option to use something like prokio to be able to run on tokio-compatible systems and on wasm :+1:

dariusc93 commented 1 year ago

Tip: Could be an option to use something like prokio to be able to run on tokio-compatible systems and on wasm :+1:

Thanks. I'll be taking a look at that soon