fix: Replace std::time::Instant by wasm_timer::Instant#2135
fix: Replace std::time::Instant by wasm_timer::Instant#2135fusetim wants to merge 1 commit intolibp2p:masterfrom
Conversation
* I checked the existing uses of Instant, there is no dependency outside the crate itself. * I can't run the test on my PC, it became really unstable when I tried but it fully compiled.
|
mdns won't work in a browser as it requires access to a udp socket. can you tell us more about what platform you're trying to run on? |
|
Yes you are right, in the case of mDNS it doesn't change anything, nevertheless we can think that some people could see the utility of using it with Node.js and in this case, Node.js has the capacity to open UDP sockets. But in my case, it's about creating a custom node with a future protocol that I have to create, based on rust-libp2p and to be compiled with the target wasm32-unknown-unknown. It should run in the browser with some wasm-bindgen stuff. I encountered an error with Gossipsub (when verifying messages) because it was using |
mxinden
left a comment
There was a problem hiding this comment.
In general, using wasm_timer across the project sounds good to me.
Yes you are right, in the case of mDNS it doesn't change anything, nevertheless we can think that some people could see the utility of using it with Node.js and in this case, Node.js has the capacity to open UDP sockets.
I would expect there to be additional blockers when using libp2p-mdns on Node.js. That said, I don't think it hurts to use wasm_timer in libp2p-mdns as well.
I left a comment on your wasm_timer pull request. Once that pull request is merged and released we can continue here.
Thanks for creating the patch @fusetim.
|
believe this one was fixed by @wngr |
Yep, thanks for the ping. Closing this. |
|
For tracking, fixed by #2245. Thanks. |
Closes #2134
Needs tomaka/wasm-timer#17
std::time::Instantwithwasm-timer::Instantfor WASM support.