go-libp2p icon indicating copy to clipboard operation
go-libp2p copied to clipboard

Make go-libp2p compile to WASM

Open v1rtl opened this issue 7 months ago • 6 comments

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

v1rtl avatar May 04 '25 17:05 v1rtl