jkb0o / pecs

Asynchronous operations for Bevy Engine
Apache License 2.0
64 stars 7 forks source link

wasm support #4

Closed happydpc closed 1 year ago

happydpc commented 1 year ago

Can it work with wasm build? if it supports, then the http request with bevy will be easy.

nikolajevs86 commented 1 year ago

I suppose it is not working, at least for me it is not compiling for wasm:

Screenshot 2023-03-12 at 16 17 25

But I am sure that ehttp is able to use for wasm as I am using it directly with some workarounds for bevy. Anyway big thanks to Yasha for creating this plugin as I thought today to implement it based on the ehttp, but luckily decided to check if there is something already implemented and was really surprised :D Maybe @jkb0o can share if there are some plans to implement support for the wasm?

jkb0o commented 1 year ago

Sorry for the late response. I've added wasm support. Http examples however spawn CORS-related errors. It should be ok if you request owned resources: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS/Errors/CORSMissingAllowOrigin

nikolajevs86 commented 1 year ago

Awesome news, thanks a lot!

happydpc commented 1 year ago

Thanks for your help, I will give it a try.