jonhoo / async-bincode

Asynchronous access to a bincode-encoded item stream.
Apache License 2.0
68 stars 9 forks source link

compatible with wasm-unknown-unknown target? #10

Closed FrankReh closed 5 months ago

FrankReh commented 2 years ago

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?

jonhoo commented 2 years ago

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.

vpzomtrrfrt commented 5 months ago

I've been using this crate in wasm32-unknown-unknown, seems to work fine