Closed dariusc93 closed 2 months ago
A couple of things to note:
Notes for Constellation:
Constellation::get
and Constellation::put
and instead rely on supplying a stream (Constellation::put_stream
or Constellation::get_stream
) or a buffer (Constellation::put_buffer
or Constellation::get_buffer
) when coming to wasm due to being unable to pull from the filesystem directly due to the limitation (and security aspect) of the browser.image
should be tested to determine if it supports being compiled to wasm via wasm32-unknown-unknown
targetNotes for MultiPass:
image
should be tested to determine if it supports being compiled to wasm via wasm32-unknown-unknown
targetNotes for RayGun:
RayGun::download_stream
should be used when downloading to a filesystem so the wasm implementation can handle downloading it to diskRayGun::attach
may require that constellation is used first and attaching it based on the constellation location due to limitation. The Location
may eventually support a stream handle instead for the related file so we can stream it to constellation via Constellation::put_stream
.Notes:
+atomics
to resolve a couple of issues I've observed.Closing since we were able to resolve this but also due to the exported api being moved to warp-wasm repo. See #603.
Regardless of the exported api, the rust api and warp-ipfs
implementation does support wasm32-unknown-unknown without needing to be exported so this have been resolved on that part.
Previously, there were wasm support at the interface level, which also exported out to javascript as well, though this increased some complexity. However, the wasm research and implementation was postponed due to a different focus. Currently, if we are to implement wasm, we should make sure that dependencies do support wasm, split/gate off any file IO and native logic (eg reading/writing files, blocking tasks, etc) and enable the appropriate features where needed for wasm support.
Note:
This is blocked untilrust-ipfs
has wasm support forwarp-ipfs
rust-ipfs
to attempt a PoC, however more changes will be needed upstream and there may be bugs.