Conversation
|
Thank you! I think this would be great to merge. For reference, did you see #2191? I'll try to review this this week. |
|
As a rough guideline, I think this would be a good way to merge Wasm support:
|
I didn't know about this PR, neat! Since then a lot of things have progressed, browsers support WebTransport much better now and Go has better WASM interop |
Do you mean to not include any transports by default for wasm target? |
Yep. Just to get everything else to compile. |
well this PR already makes it compile, despite those transports not working in WASM yet do you still prefer if I remove all transports from a default config anyway? |
v1rtl
left a comment
There was a problem hiding this comment.
Explicitly disabling wasm compilation for some unsupported APIs managed to remove 6 megabytes from the binary, mainly due to exclusion of quic-go
…-wasm-compilation-alternate
|
@MarcoPolo Any update on that? I assume it's on hold? |
|
I think the core go-libp2p can compile to wasm. It's more about building a useful transport within wasm. Some work here: #3386 that facilitates building libp2p hosts without needing packages that can't compile to wasm. |
it can't last time i checked. fails because of transport libraries that get imported as a side effect. I still have to patch stuff in go-lib2p to make it compile without trying to pull non-wasm-compatible stuff |
|
Id be very interested in this - currently working with WebSockets, WebWorkers, MessageChannels, and TCP relays. WS and worker ports are represented as plain Useful links |
Makes go-libp2p compile by omitting pion/webrtc which explicitly does not support WASM for certain APIs.
Fixes #3277
Additionally
I locally tested and verified that both linux and wasm targets build properly
This is a more basic approach to #3280, whose goal is to bring WASM support to WebRTC, but it's blocked by upstream dependencies