go-libp2p
go-libp2p copied to clipboard
Make go-libp2p compile to WASM
Makes go-libp2p compile by omitting pion/webrtc which explicitly does not support WASM for certain APIs.
Fixes #3277
Additionally
- all builtin transports are disabled for WASM in default settings, as they are not supported by browsers
- Some utilities that are still used elsewhere are moved into *_shared.go files
I locally tested and verified that both linux and wasm targets build properly
This is a more basic approach to https://github.com/libp2p/go-libp2p/pull/3280, whose goal is to bring WASM support to WebRTC, but it's blocked by upstream dependencies