File
Blob: firmware/vendor/sctp-proto/SYNC-RTC-SCTP.md
Syncing sctp-proto with rtc-sctp
This document describes how to compare and synchronize changes between
sctp-proto (standalone SCTP implementation) and rtc-sctp (SCTP module
within the rtc monorepo).
Repository Information
| Repo | URL | Commit at last sync |
|---|---|---|
| sctp-proto | https://github.com/webrtc-rs/sctp-proto | 0f3be08 (v0.6.0) |
| rtc (contains rtc-sctp) | https://github.com/webrtc-rs/rtc | c0badad |
Setup for Comparison
To set up the repositories for comparison:
# Clone both repositories side by side
mkdir -p ~/dev && cd ~/dev
git clone https://github.com/webrtc-rs/sctp-proto.git
git clone https://github.com/webrtc-rs/rtc.git
# Create symlink for easy comparison (optional)
cd sctp-proto
ln -s ../rtc/rtc-sctp rtc-sctpFinding New Changes Since Last Sync
The commits listed above are the state at the time of the last sync. To find changes that have happened SINCE then:
# See what changed in rtc-sctp since the last sync
cd ~/dev/rtc
git log c0badad..HEAD -- rtc-sctp/
# See the actual diff of new changes
git diff c0badad..HEAD -- rtc-sctp/src/Then compare those changes against the current sctp-proto to see what needs to be brought over.
Comparing the Codebases
The SCTP implementation lives in:
sctp-proto/src/- standalone versionrtc/rtc-sctp/src/- rtc monorepo version
To find all differences:
diff -rq sctp-proto/src rtc/rtc-sctp/srcTo see detailed diff for a specific file:
diff -u sctp-proto/src/association/mod.rs rtc/rtc-sctp/src/association/mod.rsKey Architectural Differences
- Error handling: sctp-proto has local
src/error.rs; rtc-sctp usesshared::error - Transport: sctp-proto uses
Transmitstruct; rtc-sctp usesTransportMessage<Payload> - Dependencies: sctp-proto uses
FxHashMap; rtc-sctp usesHashMap
Sync Policy
When syncing, we bring over:
- Bug fixes (always)
- New features (case by case)
- Refactoring (only if beneficial)
We do NOT adopt:
- Architectural changes that would add external dependencies
- Changes to transport abstractions
- Changes that remove flexibility (e.g., hardcoded constants vs configurable)
Last Sync: 2026-01-17
Changes brought from rtc-sctp to sctp-proto:
- Bug fix: Remove invalid
Eqderive fromAssociationError - Bug fix: Change
poll_timeoutto take&self - Bug fix: Propagate
handle_data()return value - Feature:
StreamEvent::BufferedAmountHighwith threshold methods - Feature: Stream ID in
StreamEvent::Opened - Feature: Stream ID in
Event::AssociationLost - Feature:
Event::HandshakeFailedvariant - Feature:
Stream::close()convenience method - Feature:
Association::stream_ids()method