Async-friendly WebRTC implementation in Rust
This report summarizes scanner evidence for webrtc-rs/webrtc, a Rust project with 5,160 GitHub stars. SynthScan examined 48,286 lines of code across 175 source files, recording 354 pattern matches distributed across 5 syntactic categories. The legacy adjusted pattern signal is 14.0 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 193 finding(s).
Are imports declared and package/API names verified? 2 finding(s).
Are wrappers, guards, and repeated structures necessary? 159 finding(s).
Which changes need focused human review? 354 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 354 distinct pattern matches across 5 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/dedicated_reactor_data_channel.rs | 113 | // ── Offerer on a dedicated reactor thread ────────────────────────────────── | COMMENT |
| MEDIUM | tests/dedicated_reactor_data_channel.rs | 158 | // ── Answerer on a dedicated reactor thread ───────────────────────────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_webrtc_interop.rs | 181 | // ──────────── Phase 1: wait for initial connection ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_webrtc_interop.rs | 294 | // ──────────── Phase 2: exchange messages before ICE restart ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_webrtc_interop.rs | 431 | // ──────────── Phase 3: ICE restart (initiated by WebRTC) ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_webrtc_interop.rs | 465 | // ──────────── Phase 4: wait for reconnection ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_webrtc_interop.rs | 549 | // ──────────── Phase 5: exchange messages after ICE restart ──────────── | COMMENT |
| MEDIUM | tests/data_channel_send_blocking.rs | 123 | // ── Sender (with an explicit small send-buffer limit ⇒ blocking send) ─────── | COMMENT |
| MEDIUM | tests/data_channel_send_blocking.rs | 165 | // ── Receiver ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/turn_credential_rotation.rs | 202 | // ── 1. Initial allocation on credential A ───────────────────────────── | COMMENT |
| MEDIUM | tests/turn_credential_rotation.rs | 230 | // ── 2. Rotate credentials and restart ICE ───────────────────────────── | COMMENT |
| MEDIUM | tests/turn_credential_rotation.rs | 297 | // ── What actually happened on the wire ──────────────────────────────── | COMMENT |
| MEDIUM | tests/offer_answer_webrtc2webrtc.rs | 21 | // ── Offerer handler ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/offer_answer_webrtc2webrtc.rs | 44 | // ── Answerer handler ─────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/offer_answer_webrtc2webrtc.rs | 96 | // ── Test entry point ─────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/offer_answer_webrtc2webrtc.rs | 115 | // ── Channels ─────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/offer_answer_webrtc2webrtc.rs | 124 | // ── Build offerer peer connection ────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/offer_answer_webrtc2webrtc.rs | 178 | // ── Build answerer peer connection ───────────────────────────────────────── | COMMENT |
| MEDIUM | tests/offer_answer_webrtc2webrtc.rs | 213 | // ── Wait for both peers to connect ───────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/offer_answer_webrtc2webrtc.rs | 224 | // ── Wait for offerer DC to open, then send test message ─────────────────── | COMMENT |
| MEDIUM⚡ | tests/offer_answer_webrtc2webrtc.rs | 232 | // ── Wait for answerer to receive and echo ───────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/offer_answer_webrtc2webrtc.rs | 239 | // ── Wait for offerer to receive echo ───────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/offer_answer_webrtc2webrtc.rs | 246 | // ── Assertions ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/renegotiation.rs | 23 | // ── Event Handlers ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/renegotiation.rs | 65 | // ── Helper functions ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/renegotiation.rs | 95 | // ── Test Case ───────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/data_channel_send_backpressure.rs | 141 | // ── Sender (with an explicit small send-buffer limit) ─────────────────────── | COMMENT |
| MEDIUM | tests/data_channel_send_backpressure.rs | 189 | // ── Receiver ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/data_channel_send_backpressure.rs | 222 | // ── Naive flood: push TOTAL_BYTES with NO bufferedAmount flow control ─────── | COMMENT |
| MEDIUM | tests/ice_restart_by_rtc_interop.rs | 180 | // ──────────── Phase 1: wait for initial connection + DC open ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_rtc_interop.rs | 287 | // ──────────── Phase 2: exchange messages before ICE restart ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_rtc_interop.rs | 361 | // ──────────── Phase 3: ICE restart (initiated by RTC) ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_rtc_interop.rs | 453 | // ──────────── Phase 4: wait for reconnection ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_rtc_interop.rs | 537 | // ──────────── Phase 5: exchange message after ICE restart ──────────── | COMMENT |
| MEDIUM | tests/statistics.rs | 22 | // ── Event Handlers ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/statistics.rs | 69 | // ── Test Case ───────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/data_channel_survives_send_failure.rs | 46 | // ── A runtime whose UDP sends can be made to fail on demand ──────────────────── | COMMENT |
| MEDIUM | tests/data_channel_survives_send_failure.rs | 155 | // ── Handlers ────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/data_channel_survives_send_failure.rs | 202 | // ── Sender, on the runtime whose sends we can break ─────────────────────── | COMMENT |
| MEDIUM | tests/data_channel_survives_send_failure.rs | 249 | // ── Receiver, on the unmodified runtime ─────────────────────────────────── | COMMENT |
| MEDIUM | tests/data_channel_survives_send_failure.rs | 286 | // ── Break every outgoing datagram, then send ────────────────────────────── | COMMENT |
| MEDIUM | tests/data_channel_send_unbounded.rs | 115 | // ── Sender ──────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/data_channel_send_unbounded.rs | 159 | // ── Receiver ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/data_channel_send_unbounded.rs | 192 | // ── Naive flood with the gate DISABLED (limit=0 ⇒ usize::MAX) ─────────────── | COMMENT |
| MEDIUM | tests/play_save_disk.rs | 35 | // ── Event Handlers ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/play_save_disk.rs | 105 | // ── Streaming Helpers ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/play_save_disk.rs | 185 | // ── Test Case ───────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/media_rejection.rs | 23 | // ── Event Handlers ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/media_rejection.rs | 65 | // ── Test Case ───────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/flexfec03_encoder_decoder.rs | 83 | // ── Interceptors ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/flexfec03_encoder_decoder.rs | 255 | // ── Handlers ────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/flexfec03_encoder_decoder.rs | 277 | // ── Fixtures ────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/flexfec03_encoder_decoder.rs | 316 | // ── Test ────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/data_channel_close_wakes_send.rs | 162 | // ── Receiver ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/data_channel_close_wakes_send.rs | 195 | // ── Flood forever with the BLOCKING send() until it errors ────────────────── | COMMENT |
| MEDIUM | tests/crypto_provider_integration.rs | 50 | // ── Provider selection ───────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/crypto_provider_integration.rs | 114 | // ── Handlers ─────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/crypto_provider_integration.rs | 175 | // ── Helpers ──────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/crypto_provider_integration.rs | 268 | // ── Offer / answer ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/crypto_provider_integration.rs | 296 | // ── Media across the link (SRTP) ────────────────────────────────────────── | COMMENT |
| 99 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/data_channel_dropped_handle_does_not_stall.rs | 1 | //! Dropping one data channel's handle must not stop every *other* channel from receiving. | COMMENT |
| LOW | tests/data_channel_send_after_close.rs | 1 | //! Regression test for the send-cap **terminal-error-on-close** property across every send | COMMENT |
| LOW | tests/media_only_negotiation_no_sctp.rs | 1 | //! Integration test for media-only async WebRTC negotiation without SCTP. | COMMENT |
| LOW | tests/rtcp_processing_webrtc2webrtc.rs | 1 | //! Async webrtc integration test for RTCP processing. | COMMENT |
| LOW | tests/rtcp_processing_webrtc2webrtc.rs | 81 | /// | COMMENT |
| LOW | tests/data_channel_slow_consumer.rs | 1 | //! A reliable, ordered data channel must deliver **every** message even when the | COMMENT |
| LOW | tests/data_channel_slow_consumer.rs | 401 | COMMENT | |
| LOW | tests/data_channels_create_interop.rs | 1 | /// Integration test for data channels create interop between rtc and webrtc | COMMENT |
| LOW | tests/simulcast_rtc_to_webrtc_interop.rs | 1 | /// Integration test for TRUE simulcast with RID (rtc → webrtc) | COMMENT |
| LOW | tests/remote_certificate_fingerprint.rs | 1 | //! Worked example: reading the peers' DTLS certificate fingerprints out of `get_stats`. | COMMENT |
| LOW | tests/data_channel_send_blocking.rs | 1 | //! Integration test for the **blocking** send back-pressure path: `DataChannel::send` with a | COMMENT |
| LOW | tests/turn_credential_rotation.rs | 1 | //! Reproduction for issue #835 — ICE restart after TURN credential rotation must not 437. | COMMENT |
| LOW | tests/turn_release_on_close.rs | 1 | //! Regression test for webrtc#903: `close()` must release the connection's TURN allocations. | COMMENT |
| LOW | tests/data_channel_send_backpressure.rs | 1 | //! Integration test for data-channel send back-pressure via the **non-blocking** | COMMENT |
| LOW | tests/data_channel_send_backpressure.rs | 21 | //! tiny limit vs a large flood this is deterministic, and it is the strongest teeth: | COMMENT |
| LOW | tests/close_releases_connection_with_transceivers.rs | 1 | //! Regression test for webrtc#906: a connection that ever held a transceiver must be freed after | COMMENT |
| LOW | tests/bind_failures_skip_addresses.rs | 1 | //! An address that cannot be bound is skipped, not fatal — unless nothing binds at all | COMMENT |
| LOW | tests/data_channel_stall_does_not_block_media.rs | 1 | //! A stalled data-channel consumer must not stop media on the same peer connection. | COMMENT |
| LOW | tests/data_channel_survives_send_failure.rs | 1 | //! Regression test for issue #776 — an unreliable data channel must survive failed sends. | COMMENT |
| LOW | tests/data_channel_send_unbounded.rs | 1 | //! Integration test for the send back-pressure **escape hatch**: building a connection with | COMMENT |
| LOW | tests/transport_objects.rs | 1 | //! The W3C transport objects are reachable from the async API, and their identities behave. | COMMENT |
| LOW | tests/ice_restart_rebinds_sockets.rs | 1 | //! An ICE restart replaces the UDP transport when the application asks for it (webrtc#868). | COMMENT |
| LOW | tests/ice_restart_rebinds_sockets.rs | 501 | COMMENT | |
| LOW | tests/ice_restart_rebinds_sockets.rs | 661 | ); | COMMENT |
| LOW | tests/dedicated_reactor_drop.rs | 1 | //! Regression tests for the bounded shared reactor pool (issue #101). | COMMENT |
| LOW | tests/flexfec03_encoder_decoder.rs | 1 | //! FlexFEC-03 end to end: the encoder protects, the path loses, the decoder rebuilds. | COMMENT |
| LOW | tests/flexfec03_encoder_decoder.rs | 61 | const NUM_MEDIA_PACKETS: u32 = 10; | COMMENT |
| LOW | tests/wildcard_bind_expands_interfaces.rs | 1 | //! A wildcard bind address means "every local interface", not the wildcard socket (webrtc#874). | COMMENT |
| LOW | tests/data_channel_close_wakes_send.rs | 1 | //! Regression test for the blocking send back-pressure close/drop liveness hang. | COMMENT |
| LOW | tests/on_data_channel_only_for_remote.rs | 1 | //! `on_data_channel` must fire only for channels the **peer** opened. | COMMENT |
| LOW | tests/crypto_provider_integration.rs | 1 | //! End-to-end validation of crypto-provider selection through the public async API. | COMMENT |
| LOW | tests/custom_runtime_interop.rs | 1 | //! Two peer connections, two different runtimes, one process. | COMMENT |
| LOW | tests/common/mod.rs | 1 | //! Shared helpers for the integration tests. | COMMENT |
| LOW | tests/common/mod.rs | 21 | /// The one runtime instance shared by every helper in this module. | COMMENT |
| LOW | .devcontainer/devcontainer.json | 21 | COMMENT | |
| LOW | examples/save-to-disk-h26x/save-to-disk-h26x.rs | 41 | #[command(version = "0.1.0")] | COMMENT |
| LOW | examples/custom-runtime/my_runtime.rs | 1 | //! A third-party async runtime for `webrtc`, over `async-executor` + `async-io`. | COMMENT |
| LOW | examples/custom-runtime/custom-runtime.rs | 1 | //! A third-party async runtime plugged into `webrtc`. | COMMENT |
| LOW | examples/data-channels/data-channels.rs | 21 | #[derive(Parser)] | COMMENT |
| LOW | examples/insertable-streams/insertable-streams.rs | 41 | const CIPHER_KEY: u8 = 0xAA; | COMMENT |
| LOW | …estimation-from-disk/bandwidth-estimation-from-disk.rs | 1 | //! bandwidth-estimation-from-disk: switch between three pre-encoded renditions as the estimate moves. | COMMENT |
| LOW | …estimation-from-disk/bandwidth-estimation-from-disk.rs | 101 | debug: bool, | COMMENT |
| LOW | …estimation-from-disk/bandwidth-estimation-from-disk.rs | 421 | /// | COMMENT |
| LOW | examples/save-to-disk-vpx/save-to-disk-vpx.rs | 41 | #[command(author = "Rain Liu <yliu@webrtc.rs>")] | COMMENT |
| LOW | examples/save-to-disk-fec/save-to-disk-fec.rs | 1 | //! save-to-disk-fec: receive a FlexFEC-03 protected stream, rebuild what the path lost, save it. | COMMENT |
| LOW | examples/save-to-disk-fec/save-to-disk-fec.rs | 61 | use common::{block_on, runtime}; | COMMENT |
| LOW | examples/save-to-disk-fec/save-to-disk-fec.rs | 81 | struct Cli { | COMMENT |
| LOW | examples/common/mod.rs | 1 | //! Shared runtime helpers for the examples. | COMMENT |
| LOW | examples/common/mod.rs | 21 | COMMENT | |
| LOW | examples/data-channels-create/data-channels-create.rs | 21 | #[derive(Parser)] | COMMENT |
| LOW | examples/play-from-disk-fec/play-from-disk-fec.rs | 1 | //! play-from-disk-fec: send video with FlexFEC-03 repair, over a path that drops packets on purpose. | COMMENT |
| LOW | examples/play-from-disk-fec/play-from-disk-fec.rs | 81 | /// The example drops more than that by default, so the browser will still see gaps. That is the | COMMENT |
| LOW | examples/play-from-disk-fec/play-from-disk-fec.rs | 101 | #[command(about = "An example of play-from-disk with FlexFEC-03 over a lossy path.")] | COMMENT |
| LOW | …ta-channels-stress-bench/data-channels-stress-bench.rs | 1 | //! Multi-pair data-channel stress bench — the reproducible A/B harness for | COMMENT |
| LOW | …ta-channels-stress-bench/data-channels-stress-bench.rs | 21 | //! `outstanding_bytes()` and print it, verifying the send counter drains to ~0 | COMMENT |
| LOW | examples/rtcp-processing/rtcp-processing.rs | 61 | COMMENT | |
| LOW | examples/rtcp-processing/rtcp-processing.rs | 141 | fn unbind_remote_stream(&mut self, _info: &StreamInfo) {} | COMMENT |
| LOW | examples/ice-restart/ice-restart.rs | 1 | //! ICE restart example. | COMMENT |
| LOW | examples/data-channels-close/data-channels-close.rs | 21 | #[derive(Parser)] | COMMENT |
| LOW | …flow-control-multi/data-channels-flow-control-multi.rs | 1 | //! Multi-pair data-channel flow-control bench for a single-`poop` N-connection run. | COMMENT |
| 131 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/data_channel_send_unbounded.rs | 218 | // byte. This is the robust delivery proof — unlike the app-level `received` counter below, it | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/peer_connection/mod.rs | 17 | //! ## Creating a Peer Connection | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/check-channel-overflow-policy.py | 31 | CODE | |
| LOW | scripts/check-crypto-boundary.py | 16 | CODE |