libp2p / go-libp2p-webrtc-direct

A libp2p transport that enables browser-to-server, and server-to-server, direct communication over WebRTC without requiring signalling servers
MIT License
82 stars 18 forks source link

WASM Support #20

Closed backkem closed 5 years ago

backkem commented 5 years ago

Support js/wasm build target.

TODO

ALTERNATIVE We could also build this library using the OnMessage callback instead of using Detach (when targetting js/wasm). However, it seems easier to maintain the wiring around OnMessage in pions/datachannel instead.

backkem commented 5 years ago

The changes in pions/webrtc#565 make the required changes to support the WebRTC side in WASM. TODO: Test to see if the Dial side works from WASM. The Listen side uses an HTTP server so it won't work unless we move to a different signaling strategy.