Async-friendly WebRTC implementation in Rust
This report presents the forensic synthetic code analysis of webrtc-rs/webrtc, a Rust project with 5,082 GitHub stars. SynthScan v2.0 examined 29,459 lines of code across 126 source files, recording 148 pattern matches distributed across 3 syntactic categories. The overall adjusted score of 12.4 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 148 distinct pattern matches across 3 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/dedicated_reactor_data_channel.rs | 111 | // ── Offerer on a dedicated reactor thread ────────────────────────────────── | COMMENT |
| MEDIUM | tests/dedicated_reactor_data_channel.rs | 156 | // ── Answerer on a dedicated reactor thread ───────────────────────────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_webrtc_interop.rs | 176 | // ──────────── Phase 1: wait for initial connection ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_webrtc_interop.rs | 289 | // ──────────── Phase 2: exchange messages before ICE restart ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_webrtc_interop.rs | 426 | // ──────────── Phase 3: ICE restart (initiated by WebRTC) ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_webrtc_interop.rs | 460 | // ──────────── Phase 4: wait for reconnection ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_webrtc_interop.rs | 544 | // ──────────── Phase 5: exchange messages after ICE restart ──────────── | COMMENT |
| MEDIUM | tests/offer_answer_webrtc2webrtc.rs | 18 | // ── Offerer handler ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/offer_answer_webrtc2webrtc.rs | 41 | // ── Answerer handler ─────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/offer_answer_webrtc2webrtc.rs | 93 | // ── Test entry point ─────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/offer_answer_webrtc2webrtc.rs | 113 | // ── Channels ─────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/offer_answer_webrtc2webrtc.rs | 122 | // ── Build offerer peer connection ────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/offer_answer_webrtc2webrtc.rs | 176 | // ── Build answerer peer connection ───────────────────────────────────────── | COMMENT |
| MEDIUM | tests/offer_answer_webrtc2webrtc.rs | 211 | // ── Wait for both peers to connect ───────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/offer_answer_webrtc2webrtc.rs | 222 | // ── Wait for offerer DC to open, then send test message ─────────────────── | COMMENT |
| MEDIUM⚡ | tests/offer_answer_webrtc2webrtc.rs | 230 | // ── Wait for answerer to receive and echo ───────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/offer_answer_webrtc2webrtc.rs | 237 | // ── Wait for offerer to receive echo ───────────────────────────────────── | COMMENT |
| MEDIUM⚡ | tests/offer_answer_webrtc2webrtc.rs | 244 | // ── Assertions ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/renegotiation.rs | 20 | // ── Event Handlers ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/renegotiation.rs | 62 | // ── Helper functions ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/renegotiation.rs | 92 | // ── Test Case ───────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_rtc_interop.rs | 175 | // ──────────── Phase 1: wait for initial connection + DC open ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_rtc_interop.rs | 282 | // ──────────── Phase 2: exchange messages before ICE restart ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_rtc_interop.rs | 356 | // ──────────── Phase 3: ICE restart (initiated by RTC) ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_rtc_interop.rs | 448 | // ──────────── Phase 4: wait for reconnection ──────────── | COMMENT |
| MEDIUM | tests/ice_restart_by_rtc_interop.rs | 532 | // ──────────── Phase 5: exchange message after ICE restart ──────────── | COMMENT |
| MEDIUM | tests/statistics.rs | 19 | // ── Event Handlers ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/statistics.rs | 66 | // ── Test Case ───────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/play_save_disk.rs | 32 | // ── Event Handlers ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/play_save_disk.rs | 102 | // ── Streaming Helpers ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/play_save_disk.rs | 182 | // ── Test Case ───────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/media_rejection.rs | 20 | // ── Event Handlers ──────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | tests/media_rejection.rs | 62 | // ── Test Case ───────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/data-channels-simple/data-channels-simple.rs | 27 | // ── Shared state for HTTP handlers ───────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/data-channels-simple/data-channels-simple.rs | 38 | // ── WebRTC event handler ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/data-channels-simple/data-channels-simple.rs | 85 | // ── Entry point ──────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/data-channels-simple/data-channels-simple.rs | 208 | // ── HTTP request handler ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/save-to-disk-h26x/save-to-disk-h26x.rs | 32 | // ── CLI ─────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/save-to-disk-h26x/save-to-disk-h26x.rs | 59 | // ── Event handler ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/save-to-disk-h26x/save-to-disk-h26x.rs | 187 | // ── Entry point ─────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | …eiver_from_kind/simulcast_add_transceiver_from_kind.rs | 32 | // ── CLI ─────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | …eiver_from_kind/simulcast_add_transceiver_from_kind.rs | 50 | // ── Event handler ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | …eiver_from_kind/simulcast_add_transceiver_from_kind.rs | 152 | // ── Entry point ─────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | …eiver_from_kind/simulcast_add_transceiver_from_kind.rs | 190 | // ── Media engine setup ─────────────────────────────────────────────────── | COMMENT |
| MEDIUM | …eiver_from_kind/simulcast_add_transceiver_from_kind.rs | 220 | // ── Output tracks (one per simulcast layer) ────────────────────────────── | COMMENT |
| MEDIUM | …eiver_from_kind/simulcast_add_transceiver_from_kind.rs | 224 | // ── Peer connection ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | …eiver_from_kind/simulcast_add_transceiver_from_kind.rs | 317 | // ── Signalling ─────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/swap-tracks/swap-tracks.rs | 41 | // ── Shared state ────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/swap-tracks/swap-tracks.rs | 54 | // ── Event handler ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/swap-tracks/swap-tracks.rs | 194 | // ── CLI ─────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/swap-tracks/swap-tracks.rs | 212 | // ── Entry point ─────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/swap-tracks/swap-tracks.rs | 253 | // ── Media engine: VP8 only ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/swap-tracks/swap-tracks.rs | 279 | // ── Output track ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/swap-tracks/swap-tracks.rs | 297 | // ── Shared state ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/swap-tracks/swap-tracks.rs | 315 | // ── Peer connection ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/swap-tracks/swap-tracks.rs | 340 | // ── Signaling ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/swap-tracks/swap-tracks.rs | 366 | // ── Track swap timer ────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/swap-tracks/swap-tracks.rs | 404 | // ── Wait for ctrl-c or peer connection failure ──────────────────────────── | COMMENT |
| MEDIUM | examples/play-from-disk-h26x/play-from-disk-h26x.rs | 45 | // ── CLI ─────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/play-from-disk-h26x/play-from-disk-h26x.rs | 72 | // ── Event handler ───────────────────────────────────────────────────────────── | COMMENT |
| 44 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| 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/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/dedicated_reactor_drop.rs | 1 | //! Regression test: dropping a dedicated-reactor peer connection *without* | COMMENT |
| LOW | .devcontainer/devcontainer.json | 21 | COMMENT | |
| LOW | examples/play-from-disk-vpx/play-from-disk-vpx.rs | 41 | COMMENT | |
| LOW | …rom-disk-renegotiation/play-from-disk-renegotiation.rs | 261 | } | COMMENT |
| LOW | examples/insertable-streams/insertable-streams.rs | 41 | #[derive(Parser)] | COMMENT |
| LOW | examples/save-to-disk-vpx/save-to-disk-vpx.rs | 41 | #[arg(short, long)] | COMMENT |
| LOW | examples/ice-restart/ice-restart.rs | 1 | //! ICE restart example. | COMMENT |
| LOW | examples/broadcast/broadcast.rs | 121 | // ── CLI ─────────────────────────────────────────────────────────────────────── | COMMENT |
| LOW | src/lib.rs | 1 | #![doc( | COMMENT |
| LOW | src/lib.rs | 21 | //! * **`Runtime`**: A trait abstracting async operations (timers, spawning, sockets). This allows the crate to | COMMENT |
| LOW | src/lib.rs | 41 | //! use std::sync::Arc; | COMMENT |
| LOW | src/lib.rs | 61 | //! ..Default::default() | COMMENT |
| LOW | src/rtp_transceiver/mod.rs | 1 | //! RTP Transceiver, Sender, and Receiver API | COMMENT |
| LOW | src/rtp_transceiver/mod.rs | 21 | //! | COMMENT |
| LOW | src/media_stream/mod.rs | 1 | //! Media Stream Tracks | COMMENT |
| LOW | src/media_stream/track_local/mod.rs | 1 | //! Local Media Stream Tracks | COMMENT |
| LOW | src/media_stream/track_local/mod.rs | 21 | //! # async fn example() -> webrtc::error::Result<()> { | COMMENT |
| LOW | src/media_stream/track_local/mod.rs | 81 | /// pipeline and sent over the peer connection. | COMMENT |
| LOW | src/media_stream/track_remote/mod.rs | 1 | //! Remote Media Stream Tracks | COMMENT |
| LOW | src/media_stream/track_remote/mod.rs | 21 | //! while let Some(event) = track.poll().await { | COMMENT |
| LOW | src/runtime/mod.rs | 1 | //! Async Runtime Abstraction | COMMENT |
| LOW | src/runtime/mod.rs | 81 | JoinHandle { | COMMENT |
| LOW | src/runtime/mod.rs | 101 | /// | COMMENT |
| LOW | src/runtime/mod.rs | 341 | pub use tokio::{ | COMMENT |
| LOW | src/runtime/mod.rs | 381 | #[cfg(all(not(feature = "runtime-tokio"), feature = "runtime-smol"))] | COMMENT |
| LOW | src/data_channel/mod.rs | 1 | //! DataChannel API | COMMENT |
| LOW | src/data_channel/mod.rs | 21 | //! # use std::sync::Arc; | COMMENT |
| LOW | src/data_channel/mod.rs | 61 | /// be generic over the interceptor type `I`. | COMMENT |
| LOW | src/data_channel/mod.rs | 101 | /// Data channel has opened and is ready to send/receive data. | COMMENT |
| LOW | src/data_channel/mod.rs | 121 | /// This event is fired when the channel is fully closed and no longer usable. | COMMENT |
| LOW | src/data_channel/mod.rs | 321 | .data_channel(self.id) | COMMENT |
| LOW | src/data_channel/mod.rs | 361 | /// # Example | COMMENT |
| LOW | src/peer_connection/mod.rs | 1 | //! PeerConnection API | COMMENT |
| LOW | src/peer_connection/mod.rs | 21 | //! PeerConnectionBuilder, PeerConnectionEventHandler, | COMMENT |
| LOW | src/peer_connection/mod.rs | 121 | /// use webrtc::peer_connection::{PeerConnectionEventHandler, RTCPeerConnectionIceEvent}; | COMMENT |
| LOW | src/peer_connection/mod.rs | 261 | COMMENT | |
| LOW | src/peer_connection/mod.rs | 321 | /// # Example | COMMENT |
| LOW | src/peer_connection/mod.rs | 441 | /// Unified channel for all outgoing driver events | COMMENT |
| LOW | src/peer_connection/mod.rs | 481 | { | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/peer_connection/mod.rs | 17 | //! ## Creating a Peer Connection | COMMENT |