librice

Crates.iolibrice
lib.rslibrice
version0.1.1
created_at2021-01-24 16:34:26.204008+00
updated_at2025-08-14 13:23:17.230541+00
descriptionICE (RFC8445) implementation
homepage
repositoryhttps://github.com/ystreet/librice
max_upload_size
id346092
size134,268
Matthew Waters (ystreet)

documentation

https://docs.rs/librice

README

Build status codecov Dependencies crates.io docs.rs

librice

Repository containing an async implementation of the ICE (RFC8445) protocol written in the Rust programming language. This async implementation is based on the sans-IO crate rice-proto in the same repository. See the rice-proto README for some details as to why use the sans-IO design.

Current status

The current status is that there is enough of the implementation to sucessfully communicate with STUN/TURN servers and/or a browser (Chrome or Firefox) in a WebRTC scenario. The STUN implementation is relatively mature. More work is needed on the ICE layer for efficiency and API experience. Initial TURN support has been implemented and some TURN-related RFCs are currently in progress. Supporting more scenarios is part of the near and long term future roadmap.

Relevant standards

  • RFC5245: Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal for Offer/Answer Protocols
  • RFC5389: Session Traversal Utilities for NAT (STUN)
  • RFC5766: Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)
  • RFC5769: Test Vectors for Session Traversal Utilities for NAT (STUN)
  • RFC6062: Traversal Using Relays around NAT (TURN) Extensions for TCP Allocations
  • RFC6156: Traversal Using Relays around NAT (TURN) Extension for IPv6
  • RFC6544: TCP Candidates with Interactive Connectivity Establishment (ICE)
  • RFC7675: Session Traversal Utilities for NAT (STUN) Usage for Consent Freshness
  • RFC8445: Interactive Connectivity Establishment (ICE): A Protocol for Network Address Translator (NAT) Traversal
  • RFC8489: Session Traversal Utilities for NAT (STUN)
  • RFC8656: Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)
  • RFC8838: Trickle ICE: Incremental Provisioning of Candidates for the Interactive Connectivity Establishment (ICE) Protocol

TODO

  • RFC6062
  • RFC6156
  • RFC7675
  • RFC8656

Building

librice depends on rice-c and thus has the same build requirements as outlined in its README.

Specifically, that either cargo-c must be installed if building from source using the librice repository for development, or the the rice-proto C API must be available in the build environment through pkg-config.

Commit count: 201

cargo fmt