-
Notifications
You must be signed in to change notification settings - Fork 3
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
wasm support? #8
Comments
That's an interesting question, I didn't consider WASM as a platform for this crate, however it seems that it is possible, so why not 😄 As you have already spotted, there is an issue for an external timer trait, honestly, I don't have good ideas on how to define one straight away, however I didn't think about it much. This issue is kind of the same to the one in Could you please share an example on how you would like to use this crate on WASM platform and how you would implement |
Actually, we don't rely on absolute time, we only need to rely on the relative time since the Button was new, so we can actually just use core::time::Duration instead of Instant. |
I tried to file a draft PR to change this, but noticed that the State enum and raw_state function are public, which means some incompatible changes have occurred to the public API. |
It would be great if you could try to implement your use case using #10 |
Yes, now it works for my use case, and I added an example running on the browser wasm. |
Is it possible to port it to run on the wasm platform?
wasm in browser don't support
Instant::now()
.If this interface is defined, it will be able to run on the wasm platform
#2 (comment)
The text was updated successfully, but these errors were encountered: