Skip to content

Instantly share code, notes, and snippets.

@DougAnderson444
Last active February 21, 2025 23:23
Show Gist options
  • Save DougAnderson444/cd2d7750f942c0412d1bdba11e5a7e2e to your computer and use it in GitHub Desktop.
Save DougAnderson444/cd2d7750f942c0412d1bdba11e5a7e2e to your computer and use it in GitHub Desktop.
So you want to use Beetswap + WebRTC? Read this first.

Beetswap in the Browser

Beetswap uses libp2p-core v0.42.0

Which means that any time you want to use Beetswap, you'll need core v0.42.0.

Oh, you want to use WebRTC though? That's fine.

Well, you'll need libp2p-webrtc-websys version 0.4.0 because anything before that breaks because __Nonexhaustive was switched to __Invalid in wasm-bindgen.

What's that you say? libp2p-webrtc-websys version 0.4.0 depends on libp2p-core ^0.43.0, which means beetswap won't work, so you'll need to fork that, create a branch that depends on core 0.42.0.

THEN there's the fact that the commit for libp2p-core v0.42.0 depends on libp2p-webrtc-utils v0.2.1, but you'll need libp2p-webrtc-utils v0.3.0 in order for libp2p-webrtc 0.8.0-alpha to be compatible with it.

But there is no git tag for libp2p-webrtc-utils-v0.3.0, so you cannot reference a commit for it. So you need ANOTHER branch with core 0.42 + utils 0.3 combined in order to use those.

That's just to get all the versions to be compatible with each other. Otherwise, the dependency tree breaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment