async-bincode icon indicating copy to clipboard operation
async-bincode copied to clipboard

compatible with wasm-unknown-unknown target?

Open FrankReh opened this issue 2 years ago • 1 comments

Was curious whether this relied on anything requiring an OS or if it could run on bare metal, specifically a wasm-unknown-unknown target. On the surface, it sounded like it just relied on futures, which do work in wasm, given an executor compatible with wasm.

But the file src/futures.rs uses std::task so I'm guessing not?

FrankReh avatar May 27 '22 20:05 FrankReh

std::task should work fine on WASM I believe, and I don't think there's anything else in the crate that requires that you run on an OS directly. You will need an executor though, and one that is compatible with either the tokio or futures async I/O traits, but apart from that you should be good to go.

jonhoo avatar May 28 '22 17:05 jonhoo