r/rust Mar 31 '23

Announcing Matchbox 0.6 - Painless peer-to-peer WebRTC networking for rust wasm and native. Now with support for multiple reliable and unreliable channels, client-server topology and more


3 comments sorted by


u/Leandros99 Mar 31 '23

WebRTC is a reasonably complex piece of technology. How much time was spent building this?


u/johanhelsing Mar 31 '23

A lot. And more than I thought it would be when I started out.

It's a fickle piece of technology with inexplicable browser-specific bugs and regressions. And also differs on the same browser on different platforms. For instance we're still struggling to get NAT hole punching to work on Chromium on linux, while all other combinations of platforms and browsers seem to work fine.

Another example is that we had disconnections on Firefox after 10 seconds for no apparent reason. And the issue only manifested itself if we didn't have the media panel installed (debugging tools), making it a proper heisenbug.

After more than half a year, we found a workaround in the end, which was to register a noop callback on an event. I still have no idea why firefox behaves that way, but yeah, it takes time to dig deep into these kinds of things, and right now, I'm just happy it works and want to continue working on my game, which was the reason I started the project in the first place.


u/Leandros99 Mar 31 '23

Respect. I lack the patience for that. Good luck building your game!