smol-rs/async-compat

Wasm error

Closed this issue · 2 comments

Hi,
I am developing a bevy game, which uses async-executor under the hood as its runtime.
I need to interact with TCP or webtransport, and both crates use the tokio runtime.

I've been able to use the tokio runtime without issue, but i'd like to avoid using it since the rest of bevy relies on smol.

I was able to replace my IO-related tasks to use Compat::new() and it seemed to work perfectly.
It works well in native, but when I tried to connect to the server in wasm I get the error:

Error(JsValue(RangeError: supplied view is not large enough.

I'm not entirely sure what this could be due to? The only thing I recall changing is adding Compat::new

Do you have a minimum reproducing example?

I think it was actually due to something unrelated; sorry about that!

Thanks for this amazing crate, I'm still a beginner with async and this has been super helpful