Skip to content
@webrtc-rs

WebRTC.rs

Async-friendly and Sans-IO WebRTC and SFU in Rust

WebRTC.rs

Async-friendly and Sans-I/O WebRTC and SFU in Rust

🌐 Website · 📝 Blog · 🎥 P2P/SFU Demo · 🎙 Discord


We build the full WebRTC network/protocol ecosystem in Rust — from low-level RTC protocols up to a browser-ready SFU, signaling server, and streaming ingest/egress. Everything is dual-licensed MIT / Apache-2.0.

Our cores are Sans-I/O: pure state machines with no sockets, no threads, and no clock of their own. The caller owns all I/O. That buys deterministic tests without a network, an async layer that isn't welded to one runtime, and — as it turns out — a media server built from the very same trait.

Projects

  • sansio — the small sansio::Protocol trait everything else is written against.
  • rtc — the Sans-I/O WebRTC core: ICE · STUN · TURN · mDNS · DTLS · SCTP · DataChannel · SRTP · RTP/RTCP · SDP.
  • sfu — a Sans-I/O SFU (Selective Forwarding Unit) media server for group calls on top of rtc.
  • signaling — a Sans-I/O signaling protocol implementation for both P2P and SFU.
  • webrtc — the async, runtime-agnostic PeerConnection API on top of rtc.
  • apprtc — P2P/SFU server and web app with automatic P2P↔SFU upgrade/downgrade, live at appr.tc.

Everything is published on crates.io:

AppRTC Signaling SFU

WebRTC RTC
Media Interceptor DataChannel
RTP RTCP SRTP SCTP
DTLS
mDNS STUN TURN ICE
SDP Shared SansIO

Each webrtc-rs project is developed and released as an independent Rust crate or application. To keep development fast, projects that depend on unreleased changes use Git submodules instead of waiting for every internal crate to be published to crates.io. The nested source layout used by AppRTC is:

apprtc/
├── [signaling]/                                  # Sans-I/O Signaling repository, AppRTC submodule
|     └── signaling-proto                         # └── signaling-proto crate
└── [sfu]/                                        # Sans-I/O SFU repository, AppRTC submodule
      └── [webrtc]/                               # Async WebRTC repository, SFU submodule
              └── [rtc]/                          # Sans-I/O RTC repository, WebRTC submodule
                    ├── rtc-datachannel           # ├── DataChannel crate
                    ├── rtc-dtls                  # ├── DTLS crate
                    ├── rtc-ice                   # ├── ICE crate
                    ├── rtc-interceptor           # ├── Interceptor crate
                    ├── rtc-interceptor-derive    # ├── Interceptor Derive crate
                    ├── rtc-mdns                  # ├── mDNS crate
                    ├── rtc-media                 # ├── Media crate
                    ├── rtc-rtcp                  # ├── RTCP crate
                    ├── rtc-rtp                   # ├── RTP crate
                    ├── rtc-sctp                  # ├── SCTP crate
                    ├── rtc-sdp                   # ├── SDP crate
                    ├── rtc-shared                # ├── Shared crate
                    ├── rtc-srtp                  # ├── SRTP crate
                    ├── rtc-stun                  # ├── STUN crate
                    └── rtc-turn                  # └── TURN crate

This lets AppRTC build and test against the exact in-development SFU, async WebRTC, and RTC revisions while preserving independent repositories, versioning, releases, and crates.io publication. Published consumers continue to use the corresponding crates.io versions; the submodule layout is a development workflow for cross-repository changes and integration testing.

Work with us

Contributors and pull requests are always welcome, and there is plenty that is well-scoped and open — simulcast, publish/subscribe, and congestion control in sfu, plus interop and performance work everywhere. Sans-I/O means you can usually test your change without a network. Come say hi on Discord.


Built with 💖. Sponsor the projects via:

GitHub Sponsors github.com/sponsors/webrtc-rs  ·  Open Collective opencollective.com/webrtc-rs  ·  Patreon patreon.com/WebRTCrs

Pinned Loading

  1. webrtc webrtc Public

    Async-friendly WebRTC implementation in Rust

    Rust 5.1k 493

  2. apprtc apprtc Public

    AppRTC P2P/SFU Server in Rust https://appr.tc

    Rust 2 2

  3. rtc rtc Public

    Sans-IO WebRTC implementation in Rust

    Rust 151 38

  4. sfu sfu Public

    Sans-IO SFU implementation in Rust

    Rust 73 12

  5. sansio sansio Public

    Sans-IO Protocol trait in Rust

    Rust 30 1

  6. signaling signaling Public

    Sans-IO Signaling Protocol implementation in Rust

    Rust 1 1

Repositories

Showing 8 of 8 repositories

Sponsors

  • @falcucci
  • @AdrianEddy
  • @nazar-pc

Top languages

Loading…

Most used topics

Loading…