tx5-go-pion-sys

Crates.iotx5-go-pion-sys
lib.rstx5-go-pion-sys
version0.8.0
created_at2023-01-17 17:40:23.012177+00
updated_at2025-08-28 16:38:13.94824+00
descriptionLow level rust bindings to the go pion webrtc library
homepage
repositoryhttps://github.com/holochain/tx5
max_upload_size
id761133
size3,049,545
Eric Harris-Braun (zippy)

documentation

https://docs.rs/tx5-go-pion-sys

README

P2P WebRTC connection establishment and pooling. Tx5 uses SBD as the WebRTC signaling protocol for connection establishment, providing an interface where you can attempt to send data to any known peer with the expectation that Tx5 will open a connection to that peer or use an existing open connection.

Project Forum Chat

License: MIT License: Apache-2.0

Tx5

  • tx5 - crates.io - The main holochain tx5 webrtc networking crate integrating the other code in this monorepo.

Tx5 Support Crates

  • tx5-connection - crates.io - Holochain webrtc connection.
  • tx5-core - crates.io - Core types used in other tx5 crates.
  • tx5-online - crates.io - Network online connectivity status events.
  • tx5-go-pion-turn - crates.io - Rust process wrapper around tx5-go-pion-turn executable.
  • tx5-go-pion-sys - crates.io - Low level rust bindings to the go pion webrtc library.
  • tx5-go-pion - crates.io - Higher level rust bindings to the go pion webrtc library.
  • tx5-signal - crates.io - Holochain webrtc signal client.
  • tx5-demo - crates.io - Demo showing off tx5 p2p connectivity.

tx5-go-pion-sys

Rust bindings to the go pion webrtc library.

Access the go-pion-webrtc api interface using the pub once_cell::sync::Lazy static [API] handle.

WARNING - Only 1 single golang ffi binding is allowed per binary. If you attempt to include a second one, you will end up running 2 parallel garbage collectors that will step on each other and crash your program.

Golang ffi works better with static linking on platforms that support it.

Unfortunately, we also must support dynamic linking for Android and Windows.

Either way, the Go code exports two calls:

  • "OnEvent" allows the go code to emit events to the rust library
  • "Call" allows the rust libary to invoke functions within go

Every api passes through one of these two iterfaces.

Commit count: 260

cargo fmt