how to run libp2p in the browser #2981
-
Hello everyone, I have a question about a use case in which my team is planning to use libp2p, not sure if this is the right place to ask it (I didn't create an issue bc I'm not sure there's actually a problem), please let me know where to do it if not. We are building a decentralized private computing network and we have started integrating libp2p to implement the networking layer. Some of the nodes are going to run on browsers and we would like to use the same code we use for regular nodes compiled to wasm. But the initial tests are giving us problems, we get a lot of issues related to timers, like this one:
This seems to be related to the usage of I’ve seen that in this PR #2320 wasm-timer support was removed and as I understand it all should be working fine without it. So the questions:
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Are you compiling your code with the The state of wasm is kind of messy and it bothers me that it is not easy to make it work out of the box. Any suggestions welcome, we definitely want to support running in wasm! |
Beta Was this translation helpful? Give feedback.
-
Hi @thomaseizinger thanks a lot for your response, nope, I wasn't using the
Awesome, thanks! we will probably have more questions down the road |
Beta Was this translation helpful? Give feedback.
Are you compiling your code with the
wasm-bindgen
feature? That may be necessary.The state of wasm is kind of messy and it bothers me that it is not easy to make it work out of the box.
Any suggestions welcome, we definitely want to support running in wasm!