Repository Analysis

wasm-bindgen/wasm-bindgen

Facilitating high-level interactions between Wasm modules and JavaScript

19.5 Moderate AI signal View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of wasm-bindgen/wasm-bindgen, a Rust project with 9,129 GitHub stars. SynthScan v2.0 examined 429,980 lines of code across 3200 source files, recording 9353 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 19.5 places this repository in the Moderate 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).

19.5
Adjusted Score
19.5
Raw Score
100%
Time Factor
2026-08-28
Last Push
9.1K
Stars
Rust
Language
430.0K
Lines of Code
3.2K
Files
9.4K
Pattern Hits
2026-08-29
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.

Severity Breakdown

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.

CRITICAL 0HIGH 0MEDIUM 35LOW 9318

Directory Score Breakdown

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.

Pattern Findings

The scanner identified 9353 distinct pattern matches across 9 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.

Over-Commented Block9295 hits · 8257 pts
SeverityFileLineSnippetContext
LOWpublish.rs1//! Helper script to publish the wasm-bindgen suite of cratesCOMMENT
LOWcrates/futures/src/lib.rs1//! Bridging the gap between Rust Futures and JavaScript Promises.COMMENT
LOWcrates/test/src/lib.rs1//! Runtime support for the `#[wasm_bindgen_test]` attributeCOMMENT
LOWcrates/test/src/lib.rs41/// This macro is invoked as:COMMENT
LOWcrates/test/src/lib.rs121COMMENT
LOWcrates/test/src/rt/mod.rs1//! Internal-only runtime module used for the `wasm_bindgen_test` crate.COMMENT
LOWcrates/test/src/rt/mod.rs21// runs.COMMENT
LOWcrates/test/src/rt/mod.rs41// * The `wasm-bindgen-test-runner` binary takes over. It runs `wasm-bindgen`COMMENT
LOWcrates/test/src/rt/mod.rs61// This is used for test filters today.COMMENT
LOWcrates/test/src/rt/mod.rs121COMMENT
LOWcrates/test/src/rt/mod.rs461/// If a test is currently running it takes the `args` array and stringifiesCOMMENT
LOWcrates/test/src/rt/mod.rs801/// we've got Rust code running we'll be able to capture output.COMMENT
LOWcrates/test/src/rt/criterion/measurement.rs1//! This module defines a set of traits that can be used to plug different measurements (eg.COMMENT
LOWcrates/test/src/rt/criterion/measurement.rs41 /// The given typical value should be used to choose the unit. This function may be calledCOMMENT
LOWcrates/test/src/rt/criterion/measurement.rs61 /// Scale the values and return a unit string designed for machines.COMMENT
LOWcrates/test/src/rt/criterion/bencher.rs1use super::measurement::Measurement;COMMENT
LOWcrates/test/src/rt/criterion/bencher.rs21/// or [`iter_batched_ref`]. See [`BatchSize`] for a discussion of batch sizes.COMMENT
LOWcrates/test/src/rt/criterion/bencher.rs41 /// Times a `routine` by executing it many times and timing the total elapsed time.COMMENT
LOWcrates/test/src/rt/criterion/bencher.rs61 for _ in 0..self.iters {COMMENT
LOWcrates/test/src/rt/criterion/bencher.rs81 ///COMMENT
LOWcrates/test/src/rt/criterion/bencher.rs101 self.iterated = true;COMMENT
LOWcrates/test/src/rt/criterion/bencher.rs141 /// # ExampleCOMMENT
LOWcrates/test/src/rt/criterion/mod.rs1//! A statistics-driven micro-benchmarking library written in Rust.COMMENT
LOWcrates/test/src/rt/criterion/mod.rs61///COMMENT
LOWcrates/test/src/rt/criterion/mod.rs141 /// measurement time.COMMENT
LOWcrates/test/src/rt/criterion/mod.rs161 #[must_use]COMMENT
LOWcrates/test/src/rt/criterion/mod.rs181 assert!(dur.as_nanos() > 0);COMMENT
LOWcrates/test/src/rt/criterion/mod.rs201 if n <= 1000 {COMMENT
LOWcrates/test/src/rt/criterion/mod.rs241 console_error!(COMMENT
LOWcrates/test/src/rt/criterion/mod.rs281 M: Measurement + 'static,COMMENT
LOWcrates/test/src/rt/criterion/mod.rs341 /// Benchmarks a future.COMMENT
LOWcrates/test/src/rt/criterion/mod.rs381 /// an input string or `&[u8]`.COMMENT
LOWcrates/test/src/rt/criterion/mod.rs401/// This enum allows the user to control how Criterion.rs chooses the iteration count when sampling.COMMENT
LOW…st/src/rt/criterion/stats/univariate/outliers/tukey.rs1//! Tukey's methodCOMMENT
LOW…st/src/rt/criterion/stats/univariate/outliers/tukey.rs21//!COMMENT
LOW…test/src/rt/criterion/stats/univariate/outliers/mod.rs1//! Classification of outliersCOMMENT
LOWcrates/test/src/rt/web_time/instant.rs101 }COMMENT
LOWcrates/cli-support/src/externref.rs201COMMENT
LOWcrates/cli-support/src/intrinsic.rs1//! Definition of all wasm-bindgen intrinsics.COMMENT
LOWcrates/cli-support/src/lib.rs461 // That includes checking that the binary has the same schema versionCOMMENT
LOWcrates/cli-support/src/lib.rs521 // own, which would otherwise reclassify a `panic=abort` module asCOMMENT
LOWcrates/cli-support/src/lib.rs541 // externref table and allocation function.COMMENT
LOWcrates/cli-support/src/suggest.rs1//! Suggestion helpers for "did you mean ...?" diagnostics.COMMENT
LOWcrates/cli-support/src/descriptor.rs1use std::char;COMMENT
LOWcrates/cli-support/src/wasm_conventions.rs101 match candidates.len() {COMMENT
LOWcrates/cli-support/src/wasm2es6js.rs201 }COMMENT
LOWcrates/cli-support/src/descriptors.rs1//! Management of wasm-bindgen descriptor functions.COMMENT
LOWcrates/cli-support/src/interpreter/mod.rs1//! A tiny and incomplete Wasm interpreterCOMMENT
LOWcrates/cli-support/src/interpreter/mod.rs41 // during descriptor execution.COMMENT
LOWcrates/cli-support/src/interpreter/mod.rs61COMMENT
LOWcrates/cli-support/src/interpreter/mod.rs241 }COMMENT
LOWcrates/cli-support/src/interpreter/mod.rs541 }COMMENT
LOWcrates/cli-support/src/js/mod.rs41}COMMENT
LOWcrates/cli-support/src/js/mod.rs161COMMENT
LOWcrates/cli-support/src/js/mod.rs181 /// emcc needs to keep alive).COMMENT
LOWcrates/cli-support/src/js/mod.rs201 emscripten_import_postsets: BTreeMap<ImportId, String>,COMMENT
LOWcrates/cli-support/src/js/mod.rs281 /// Whether to generate helper methods for inspecting the classCOMMENT
LOWcrates/cli-support/src/js/mod.rs481 }COMMENT
LOWcrates/cli-support/src/js/mod.rs1821 // must list every library symbol any adapter referenced (Imports'COMMENT
LOWcrates/cli-support/src/js/mod.rs1921 }COMMENT
9235 more matches not shown…
Decorative Section Separators33 hits · 102 pts
SeverityFileLineSnippetContext
MEDIUMcrates/js-sys/src/futures/jspi.rs83// ─── Promising-entered task polls ────────────────────────────────────────────COMMENT
MEDIUMcrates/cli/tests/wasm-bindgen/main.rs3543// ─── JSPI (JS Promise Integration) runtime tests ─────────────────────────────COMMENT
MEDIUMcrates/cli/tests/reference/jspi.rs5// ── Suspending imports ───────────────────────────────────────────────────────COMMENT
MEDIUMcrates/cli/tests/reference/jspi.rs32// ── JSPI exports ─────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi-fetch-streams/index.html207// ── Feature detection ────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi-fetch-streams/index.html232// ── Load WASM ────────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi-fetch-streams/index.html248// ── Demo ①: fetch + response streaming ──────────────────────────────────────COMMENT
MEDIUMexamples/jspi-fetch-streams/index.html259// ── Demo ②: read a JavaScript ReadableStream from Rust ───────────────────────COMMENT
MEDIUMexamples/jspi-fetch-streams/index.html291// ── Demo ③: request body streaming detection ────────────────────────────────COMMENT
MEDIUMexamples/jspi-fetch-streams/index.html304// ── Demo ④: concurrent fibers ────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi-fetch-streams/index.html328// ── Run all ──────────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi-opfs/index.html124><span class="cm">// ── write a file ─────────────────────────────────────</span>CODE
MEDIUMexamples/jspi-opfs/index.html134<span class="cm">// ── read a file ──────────────────────────────────────</span>CODE
MEDIUMexamples/jspi-opfs/index.html200// ── Feature detection ────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi-opfs/index.html211// ── Load WASM ────────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi-opfs/index.html223// ── Button handlers ──────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi-opfs/index.html303 // ── Concurrent reads (shadow-stack isolation test) ───────────────────────COMMENT
MEDIUMexamples/jspi-opfs/src/lib.rs33// ─── navigator.storage helper ────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi-opfs/src/lib.rs58// ─── Path traversal ──────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi-opfs/src/lib.rs108// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi/index.html49 // ── Feature detection ────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi/index.html62 // ── Load WASM module ─────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi/index.html70 // ── Demo 1: non-async sleep ──────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi/index.html79 // ── Demo 2: concurrent fibers ────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi/index.html96 // ── Demo 3: large stack frames across a suspension ───────────────────────COMMENT
MEDIUMexamples/jspi/index.html111 // ── Demo 4: deep recursion + post-resume heap allocation ─────────────────COMMENT
MEDIUMexamples/jspi/index.html140 // ── Demo 5: concurrent deep-alloc fibers ─────────────────────────────────COMMENT
MEDIUMexamples/jspi/src/lib.rs40// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi/src/lib.rs42// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi/src/lib.rs66// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi/src/lib.rs68// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi/src/lib.rs113// ─────────────────────────────────────────────────────────────────────────────COMMENT
MEDIUMexamples/jspi/src/lib.rs115// ─────────────────────────────────────────────────────────────────────────────COMMENT
Structural Annotation Overuse8 hits · 12 pts
SeverityFileLineSnippetContext
LOWguide/src/wasm-bindgen-test/benchmark.md20### Step 1 - Add Dependency to Cargo.toml ###COMMENT
LOWguide/src/wasm-bindgen-test/benchmark.md29### Step 2 - Add Benchmark ###COMMENT
LOWguide/src/wasm-bindgen-test/benchmark.md44### Step 3 - Run Benchmark ###COMMENT
LOWguide/src/wasm-bindgen-test/benchmark.md64### Step 4 - Optimize ###COMMENT
LOWguide/src/wasm-bindgen-test/benchmark.md105### Step 5 - Asynchronous function ###COMMENT
LOWguide/src/wasm-bindgen-test/benchmark.md125### Step 6 - Run benchmark in browser ###COMMENT
LOWguide/src/wasm-bindgen-test/benchmark.md129### Step 7 - Configuration ###COMMENT
LOWsrc/rt/mod.rs1021// NOTE: This method is used to encode u32 into a variable-length-integer during the compile-time .COMMENT
Fake / Example Data7 hits · 8 pts
SeverityFileLineSnippetContext
LOWcrates/webidl/src/constants.rs1070 "placeholder",CODE
LOWcrates/webidl/src/constants.rs1266 "placeholder",CODE
LOWcrates/web-sys/src/features/gen_HtmlTextAreaElement.rs179 js_name = "placeholder"CODE
LOWcrates/web-sys/src/features/gen_HtmlTextAreaElement.rs191 js_name = "placeholder"CODE
LOWcrates/web-sys/src/features/gen_HtmlInputElement.rs408 #[wasm_bindgen(method, getter, js_class = "HTMLInputElement", js_name = "placeholder")]COMMENT
LOWcrates/web-sys/src/features/gen_HtmlInputElement.rs415 #[wasm_bindgen(method, setter, js_class = "HTMLInputElement", js_name = "placeholder")]COMMENT
LOWexamples/weather_report/src/lib.rs238 .set_attribute("placeholder", "Type city name here")CODE
AI Slop Vocabulary2 hits · 6 pts
SeverityFileLineSnippetContext
MEDIUMcrates/js-sys/src/lib.rs5963 /// It is a more robust version of the original, global isNaN().COMMENT
MEDIUMsrc/cast.rs31 /// In general this is intended to be a more robust version ofCOMMENT
Hyper-Verbose Identifiers5 hits · 5 pts
SeverityFileLineSnippetContext
LOWcrates/cli-support/src/js/mod.rs4155 function GetOwnOrInheritedPropertyDescriptor(obj, id) {CODE
LOWcrates/js-sys/tests/wait_async_mock.js6export function installNotifyOnlyWaitAsyncMock() {CODE
LOWcrates/js-sys/tests/wasm/Promise.js86export async function testRustDoubleNumberPromise(rustModule) {CODE
LOWcrates/cli/tests/reference/generic-import.bg.js714function GetOwnOrInheritedPropertyDescriptor(obj, id) {CODE
LOWexamples/raytrace-parallel/server.py5class RequestHandler(SimpleHTTPRequestHandler):CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOWcrates/cli-support/src/interpreter/mod.rs259 /// # Return valueCOMMENT
TODO Padding1 hit · 2 pts
SeverityFileLineSnippetContext
LOWcrates/js-sys/tests/wasm/JsString.rs649 // TODO: Add test once we have optional parametersCOMMENT
Slop Phrases1 hit · 1 pts
SeverityFileLineSnippetContext
LOWcrates/cli-support/src/wit/mod.rs2836don't forget to recompile your Wasm file! Alternatively, you can update theCODE