-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for wasm and Cloudflare Workers #292
Comments
Thanks for the report. We had never tried to compile to wasm so anything could happen. It would be great to make it possible as long as it's not super complicated. I have no idea how Cloudflare Workers work, though. It seems like
The solution to this would be to just not enforce Unfortunately, I don't have enough free time right now for this myself right now. I'm on finals and working on my final year project. Maybe after New Years or so, I don't know. Supporting wasm seems viable, but it's definitely quite a bit of work. If you're interested in doing it yourself I could definitely review your changes from time to time or give you advice. You more or less know where to start now. Or maybe @ramsayleung wants to help out. |
It would be great to make this crate to compile to Is there a way to create an environment to reproduce this issue? As Mario illustrating clearly, there are two ways to compile
Both solutions take time to work. If you can't wait to develop your project and make
It seems the |
I've managed to compile it with removing all of Send markers from signatures and maybe_async on following commit and it works on Cloudflare Wokers as expected. also tried to make it switchable with feature but seems like cargo doesn't allow us to flag features depends on arch yet so I couldn't. If you have any workaround or idea, please let me know! |
After looking at the commit above, I figured I didn't need to delete all sends, so I created the following commit. However, there is no need to remove the Send boundary of the structure, and replacing
with
as in the commit below compiles and seems to work with cloudflere-workers. I am not sure if this is the best solution. |
Great! No need to add a feature, we can just use the target itself to configure whether it's send or not (e. g. What could be a problem is trying to make that switch with all the Could you perhaps make a PR with those changes? |
@marioortizmanero Thank you for your support! |
Notice that some of these Not 100% sure anyway, I'll have to try it myself when I have time. |
Can we have #293 reviewed and merged to enable compiling to wasm and deploying to Cloudflare? |
I have managed to make it work as per #293 will raise PR at some point this week I just need to address prior concerns related to CI and to make sure that all tests pass. |
Message to comment on stale issues. If none provided, will not mark issues stale |
Hey, wanted to let you know that I tried finishing what @shiguma127 started, PR here: #458 |
Closing this issue since the support for wasm and Cloudflare has been merged. |
I would like to use this library with Cloudflare Workers.
when I try to compile the following code
then it occurs this error
and when i use rspotify whth features=["client-ureq","ureq-rustls-tls"] on wrangler project
I can compile, but I can't deploy with this error.
I don't think there is anything that can't be done since reqwest also supports wasm.
How do you think?
Thaks.
The text was updated successfully, but these errors were encountered: