frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: webrtc-rs/rtc – A Sans-I/O WebRTC Stack for Rust

4•rainliu•10h ago
We're excited to share rtc (https://github.com/webrtc-rs/rtc), a pure Rust WebRTC implementation built on the sans-I/O architecture. With the recent release of rtc v0.7.0, we've achieved feature parity with our async-based webrtc crate while offering complete runtime independence.

## What is Sans-I/O?

Sans-I/O separates protocol logic from I/O operations. Instead of the library performing network reads/writes, YOU control all I/O. The library acts as a pure state machine.

Core API (8 methods):

- poll_write() / poll_event() / poll_read() / poll_timeout() - Get outputs

- handle_read() / handle_timeout() / handle_write() / handle_event() - Feed inputs

## Why Sans-I/O for WebRTC?

WebRTC is a STACK of protocols (ICE, DTLS, SRTP, SCTP, RTP/RTCP). Traditional implementations tightly couple protocol logic with async runtimes, making them runtime-locked, difficult to test without network I/O, and hard to integrate into existing event loops.

Sans-I/O solves this by modeling WebRTC as a composable protocol pipeline where each layer implements the same sansio::Protocol trait.

## Feature Parity

- Full WebRTC 1.0 API (PeerConnection, Media, DataChannel)

- Complete protocol stack (ICE, DTLS, SRTP/SRTCP, SCTP, RTP/RTCP)

- Simulcast with multiple spatial layers

- RTCP Interceptors (NACK, Sender/Receiver Reports, TWCC)

- mDNS support for IP privacy

- W3C and RFC compliant

## Architecture Highlights

- Pure Protocol Pipeline: WebRTC as composable handlers implementing sansio::Protocol. Read: Raw Bytes → Demuxer → ICE → DTLS → SCTP/SRTP → Interceptor → Endpoint. Write path reverses this.

- Zero-Cost Abstractions: Interceptors use generic composition instead of async trait objects. No heap allocations in the hot path.

- Multi-Socket I/O: Handle multiple sockets (mDNS multicast + WebRTC traffic) in one event loop - difficult with async designs.

- Testable: Protocol logic tested without network I/O. Feed synthetic packets, verify state transitions.

## Relationship with async webrtc

rtc (sans-I/O) and webrtc (async) are COMPLEMENTARY:

- Use webrtc for async/await, Tokio integration, quick start

- Use rtc for runtime independence, custom I/O, maximum control, embedded systems

Both actively maintained.

## Recent Milestones

v0.7.0 (Jan 10) - mDNS support for IP privacy with .local hostnames

v0.6.0 (Jan 9) - Complete interceptor framework (NACK, RTCP Reports, TWCC)

v0.5.0 (Jan 5) - Enhanced simulcast support

v0.3.0 (Jan 4) - Initial public release

## Use Cases

Sans-I/O shines for: custom networking, embedded systems, game engines, high performance applications, testing infrastructure, WebAssembly.

## Links

- GitHub: https://github.com/webrtc-rs/rtc

- Crates.io: https://crates.io/crates/rtc (v0.7.0)

- Docs: https://docs.rs/rtc

- Blog: https://webrtc.rs/blog

- Discord: https://discord.gg/4Ju8UHdXMs

Technical deep dives available on our blog exploring the protocol pipeline architecture and interceptor design principles.

We'd love feedback from the Rust and WebRTC communities!

Comments

Sean-Der•10h ago
Congrats! Big project to go Sans-I/O :)
agentifysh•10h ago
Great work I have some extra questions if you could help a noob like me:

Since I have to bring my own I/O, do you have a reference implementation or 'glue' code examples for tokio, Bevy ,std::net so I don't have to write the event loop from scratch?

How does this integrate with the existing webrtc-rs media crates? Can I still use the media crate for packetizing H.264/Opus, or do I need to handle payload processing manually too?

encryption (DTLS/SRTP) layer interface with the Sans-I/O model? Does it rely on ring or openssl does that introduce blocking or heap allocations?

benchmarks comparing CPU usage between the async webrtc crate and rtc under high load?

Is API stable or should I expect breaking changes to the poll_ or handle_ methods in the near future?

are theer plan to support web transport, or is the focus strictly on webrtc 1.0?

since the library doesn't control the socket directly, how does it accurately estimate bandwidth to tell the video encoder to scale down?

rainliu•8h ago
https://github.com/webrtc-rs/rtc/blob/master/examples/exampl... lists examples how to write the event loop with sansio::Protocol interface.

sansio::Protocol API is stable, since crate sansio is stable v1.0.

The mdns-query-and-gather example shows how to control multiple I/O sockets to use and how to multiplex them with sansio::Protocol API.

For bandwidth estimation, you can register your own Interceptor with callback or event message to tell the video encoder.

GPT-5.2 Solves *Another Erdős Problem, #729

https://old.reddit.com/r/singularity/comments/1q9beym/gpt52_solves_another_erd%C5%91s_problem_729/
1•energy123•47s ago•0 comments

Design Amnesia

https://blog.ayjay.org/design-amnesia/
1•kruuuder•1m ago•0 comments

Lego Farming Blocks: Letting AIs Grow Our Food

https://adlrocha.substack.com/p/adlrocha-lego-farming-blocks-letting
1•adlrocha•3m ago•0 comments

Question for Discussion

https://www.google.com/
1•flyzonic•4m ago•0 comments

Show HN: A policy enforcement layer for LLM outputs (why prompts weren't enough)

1•kundan_s__r•4m ago•0 comments

Ask HN: Senior software engineers, how do you use Claude Code?

2•allie1•5m ago•0 comments

Milano Cortina Winter Olympics threatened by Cloudflare funding withdrawal

https://www.aljazeera.com/sports/2026/1/10/milano-cortina-winter-olympics-threatened-by-cloudfare...
1•DyslexicAtheist•8m ago•0 comments

Ramon Ontiveros and the Vigilante Lie

https://substack.com/home/post/p-184188950
1•htwatchdogs•9m ago•1 comments

Show HN: Verdic Guard – Policy Enforcement and Output Validation for LLMs

1•kundan_s__r•11m ago•1 comments

Show HN: Show HN submissions have tripled since 2023

https://imgur.com/a/K0A1yc1
3•anythingworks•13m ago•0 comments

Prompting 101: Show, don't tell

https://www.haskellforall.com/2026/01/prompting-101-show-dont-tell.html
1•birdculture•14m ago•0 comments

What's New in Pandas 3.0: Expressions, Copy-on-Write, and Faster Strings

https://codecut.ai/pandas-3-whats-new/
2•Ben5555•15m ago•0 comments

Show HN: I created an interactive tool to visualize various ML algorithms

https://github.com/YashArote/descent-visualisers
1•yasharote28•25m ago•0 comments

Location Aware AI Landscaping

https://hadaa.pro/
1•Fh_•28m ago•1 comments

Quake Setup Guide (2023)

https://sarge945.xyz/guides/quake-guide/
1•Lammy•32m ago•0 comments

Notion used Product Hunt to grow, not just launch

https://www.firstmillion.club/p/notion
2•elananandhan•33m ago•0 comments

The 3k-Person Team Working in Secret to Create Disney Magic (WSJ)

https://www.wsj.com/business/media/disney-cruise-rides-characters-imagineers-adventure-b5c03c1d
1•aenean•37m ago•1 comments

Show HN: I auto-generate alt text using Gemini 3 Flash

https://sarthakmishra.com/blog/automating-image-alt-text
2•sarthak_drool•44m ago•0 comments

More than one hundred years of Film Sizes

https://wichm.home.xs4all.nl/filmsize.html
7•exvi•50m ago•0 comments

BTS of OpenTelemetry Instrumentation

https://newsletter.signoz.io/p/bts-of-opentelemetry-auto-instrumentation
2•elza_1111•52m ago•0 comments

Claude Codes

https://thezvi.substack.com/p/claude-codes
1•nsoonhui•56m ago•0 comments

Sir Nicholas Winton – BBC Programme "That's Life" Aired in 1988 [video]

https://www.youtube.com/watch?v=6_nFuJAF5F0
1•handfuloflight•57m ago•0 comments

Spectral Geodesic Routing: Traffic Engineering via Laplacian Potentials

https://zenodo.org/records/18193686
3•andrespi•58m ago•0 comments

Native iOS and Android Nullschool App

https://twitter.com/cambecc/status/2010254018598392022
1•pppone•59m ago•0 comments

Uruguay's Renewable Charge: A Small Nation, a Big Lesson for the World

https://www.forbes.com/sites/kensilverstein/2025/10/19/uruguays-renewable-charge-a-small-nation-a...
2•ciconia•59m ago•0 comments

A Practical Guide to Build Secure MCP Servers

https://go.mcptotal.io/blog/a-practical-guide-to-build-secure-mcp-servers
2•agentictime•1h ago•0 comments

Whenwords: A relative time formatting library, with no code

https://github.com/dbreunig/whenwords
1•todsacerdoti•1h ago•0 comments

Mossad urges Iran protests, says agents present

https://www.jpost.com/middle-east/iran-news/article-881733
2•ParentiSoundSys•1h ago•0 comments

21 years of IDE evolution in one chart (2004 – 2025)

https://twitter.com/willwangcc/status/2010259528391307510
2•will_wang•1h ago•1 comments

Annote: A Turing complete language using only Java annotations as its syntax

https://github.com/kusoroadeolu/annote
1•kushv•1h ago•1 comments