Facilitating high-level interactions between Wasm modules and JavaScript
This report summarizes scanner evidence for wasm-bindgen/wasm-bindgen, a Rust project with 9,182 GitHub stars. SynthScan examined 435,948 lines of code across 3223 source files, recording 9365 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 19.3 (Elevated 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? 9325 finding(s).
Are imports declared and package/API names verified? 7 finding(s).
Are wrappers, guards, and repeated structures necessary? 38 finding(s).
Which changes need focused human review? 9365 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 9365 distinct pattern matches across 9 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 |
|---|---|---|---|---|
| LOW | publish.rs | 1 | //! Helper script to publish the wasm-bindgen suite of crates | COMMENT |
| LOW | crates/futures/src/lib.rs | 1 | //! Bridging the gap between Rust Futures and JavaScript Promises. | COMMENT |
| LOW | crates/futures/src/tokio.rs | 1 | //! Tokio event loops for `#[wasm_bindgen(experimental_tokio)]` exports. | COMMENT |
| LOW | crates/futures/src/tokio.rs | 101 | /// Schedules `future` as the root of a fresh event loop owned by this call, | COMMENT |
| LOW | crates/futures/src/tokio.rs | 141 | .enable_time() | COMMENT |
| LOW | crates/test/src/lib.rs | 1 | //! Runtime support for the `#[wasm_bindgen_test]` attribute | COMMENT |
| LOW | crates/test/src/lib.rs | 41 | /// This macro is invoked as: | COMMENT |
| LOW | crates/test/src/lib.rs | 121 | COMMENT | |
| LOW | crates/test/src/rt/mod.rs | 1 | //! Internal-only runtime module used for the `wasm_bindgen_test` crate. | COMMENT |
| LOW | crates/test/src/rt/mod.rs | 21 | // runs. | COMMENT |
| LOW | crates/test/src/rt/mod.rs | 41 | // * The `wasm-bindgen-test-runner` binary takes over. It runs `wasm-bindgen` | COMMENT |
| LOW | crates/test/src/rt/mod.rs | 61 | // This is used for test filters today. | COMMENT |
| LOW | crates/test/src/rt/mod.rs | 121 | COMMENT | |
| LOW | crates/test/src/rt/mod.rs | 461 | /// If a test is currently running it takes the `args` array and stringifies | COMMENT |
| LOW | crates/test/src/rt/mod.rs | 801 | /// we've got Rust code running we'll be able to capture output. | COMMENT |
| LOW | crates/test/src/rt/criterion/measurement.rs | 1 | //! This module defines a set of traits that can be used to plug different measurements (eg. | COMMENT |
| LOW | crates/test/src/rt/criterion/measurement.rs | 41 | /// The given typical value should be used to choose the unit. This function may be called | COMMENT |
| LOW | crates/test/src/rt/criterion/measurement.rs | 61 | /// Scale the values and return a unit string designed for machines. | COMMENT |
| LOW | crates/test/src/rt/criterion/bencher.rs | 1 | use super::measurement::Measurement; | COMMENT |
| LOW | crates/test/src/rt/criterion/bencher.rs | 21 | /// or [`iter_batched_ref`]. See [`BatchSize`] for a discussion of batch sizes. | COMMENT |
| LOW | crates/test/src/rt/criterion/bencher.rs | 41 | /// Times a `routine` by executing it many times and timing the total elapsed time. | COMMENT |
| LOW | crates/test/src/rt/criterion/bencher.rs | 61 | for _ in 0..self.iters { | COMMENT |
| LOW | crates/test/src/rt/criterion/bencher.rs | 81 | /// | COMMENT |
| LOW | crates/test/src/rt/criterion/bencher.rs | 101 | self.iterated = true; | COMMENT |
| LOW | crates/test/src/rt/criterion/bencher.rs | 141 | /// # Example | COMMENT |
| LOW | crates/test/src/rt/criterion/mod.rs | 1 | //! A statistics-driven micro-benchmarking library written in Rust. | COMMENT |
| LOW | crates/test/src/rt/criterion/mod.rs | 61 | /// | COMMENT |
| LOW | crates/test/src/rt/criterion/mod.rs | 141 | /// measurement time. | COMMENT |
| LOW | crates/test/src/rt/criterion/mod.rs | 161 | #[must_use] | COMMENT |
| LOW | crates/test/src/rt/criterion/mod.rs | 181 | assert!(dur.as_nanos() > 0); | COMMENT |
| LOW | crates/test/src/rt/criterion/mod.rs | 201 | if n <= 1000 { | COMMENT |
| LOW | crates/test/src/rt/criterion/mod.rs | 241 | console_error!( | COMMENT |
| LOW | crates/test/src/rt/criterion/mod.rs | 281 | M: Measurement + 'static, | COMMENT |
| LOW | crates/test/src/rt/criterion/mod.rs | 341 | /// Benchmarks a future. | COMMENT |
| LOW | crates/test/src/rt/criterion/mod.rs | 381 | /// an input string or `&[u8]`. | COMMENT |
| LOW | crates/test/src/rt/criterion/mod.rs | 401 | /// 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.rs | 1 | //! Tukey's method | COMMENT |
| LOW | …st/src/rt/criterion/stats/univariate/outliers/tukey.rs | 21 | //! | COMMENT |
| LOW | …test/src/rt/criterion/stats/univariate/outliers/mod.rs | 1 | //! Classification of outliers | COMMENT |
| LOW | crates/test/src/rt/web_time/instant.rs | 101 | } | COMMENT |
| LOW | crates/cli-support/src/externref.rs | 201 | COMMENT | |
| LOW | crates/cli-support/src/intrinsic.rs | 1 | //! Definition of all wasm-bindgen intrinsics. | COMMENT |
| LOW | crates/cli-support/src/lib.rs | 481 | // sections. | COMMENT |
| LOW | crates/cli-support/src/lib.rs | 521 | if self.multi_value { | COMMENT |
| LOW | crates/cli-support/src/lib.rs | 541 | // under `wasm_bindgen_unstable_jspi` the fibers belong to | COMMENT |
| LOW | crates/cli-support/src/lib.rs | 1061 | // ... and after we delete the `implements` directive we try to | COMMENT |
| LOW | crates/cli-support/src/suggest.rs | 1 | //! Suggestion helpers for "did you mean ...?" diagnostics. | COMMENT |
| LOW | crates/cli-support/src/descriptor.rs | 1 | use std::char; | COMMENT |
| LOW | crates/cli-support/src/wasm_conventions.rs | 101 | match candidates.len() { | COMMENT |
| LOW | crates/cli-support/src/wasm2es6js.rs | 201 | } | COMMENT |
| LOW | crates/cli-support/src/descriptors.rs | 1 | //! Management of wasm-bindgen descriptor functions. | COMMENT |
| LOW | crates/cli-support/src/interpreter/mod.rs | 1 | //! A tiny and incomplete Wasm interpreter | COMMENT |
| LOW | crates/cli-support/src/interpreter/mod.rs | 41 | // during descriptor execution. | COMMENT |
| LOW | crates/cli-support/src/interpreter/mod.rs | 61 | COMMENT | |
| LOW | crates/cli-support/src/interpreter/mod.rs | 241 | } | COMMENT |
| LOW | crates/cli-support/src/interpreter/mod.rs | 541 | } | COMMENT |
| LOW | crates/cli-support/src/js/mod.rs | 41 | } | COMMENT |
| LOW | crates/cli-support/src/js/mod.rs | 161 | COMMENT | |
| LOW | crates/cli-support/src/js/mod.rs | 181 | /// emcc needs to keep alive). | COMMENT |
| LOW | crates/cli-support/src/js/mod.rs | 201 | emscripten_import_postsets: BTreeMap<ImportId, String>, | COMMENT |
| 9247 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | crates/js-sys/src/futures/jspi.rs | 151 | // ─── Promising-entered task polls ──────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/cli/tests/wasm-bindgen/main.rs | 4328 | // ─── JSPI (JS Promise Integration) runtime tests ───────────────────────────── | COMMENT |
| MEDIUM | crates/cli/tests/reference/jspi.rs | 5 | // ── Suspending imports ─────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | crates/cli/tests/reference/jspi.rs | 32 | // ── JSPI exports ───────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi-fetch-streams/index.html | 207 | // ── Feature detection ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi-fetch-streams/index.html | 232 | // ── Load WASM ──────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi-fetch-streams/index.html | 248 | // ── Demo ①: fetch + response streaming ────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi-fetch-streams/index.html | 259 | // ── Demo ②: read a JavaScript ReadableStream from Rust ─────────────────────── | COMMENT |
| MEDIUM | examples/jspi-fetch-streams/index.html | 291 | // ── Demo ③: request body streaming detection ──────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi-fetch-streams/index.html | 304 | // ── Demo ④: concurrent fibers ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi-fetch-streams/index.html | 328 | // ── Run all ────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi-opfs/index.html | 124 | ><span class="cm">// ── write a file ─────────────────────────────────────</span> | CODE |
| MEDIUM | examples/jspi-opfs/index.html | 134 | <span class="cm">// ── read a file ──────────────────────────────────────</span> | CODE |
| MEDIUM | examples/jspi-opfs/index.html | 200 | // ── Feature detection ──────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi-opfs/index.html | 211 | // ── Load WASM ──────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi-opfs/index.html | 223 | // ── Button handlers ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi-opfs/index.html | 303 | // ── Concurrent reads (shadow-stack isolation test) ─────────────────────── | COMMENT |
| MEDIUM | examples/jspi-opfs/src/lib.rs | 33 | // ─── navigator.storage helper ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi-opfs/src/lib.rs | 58 | // ─── Path traversal ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi-opfs/src/lib.rs | 108 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi/index.html | 49 | // ── Feature detection ──────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | examples/jspi/index.html | 62 | // ── Load WASM module ───────────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | examples/jspi/index.html | 70 | // ── Demo 1: non-async sleep ────────────────────────────────────────────── | COMMENT |
| MEDIUM⚡ | examples/jspi/index.html | 79 | // ── Demo 2: concurrent fibers ──────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi/index.html | 96 | // ── Demo 3: large stack frames across a suspension ─────────────────────── | COMMENT |
| MEDIUM | examples/jspi/index.html | 111 | // ── Demo 4: deep recursion + post-resume heap allocation ───────────────── | COMMENT |
| MEDIUM | examples/jspi/index.html | 140 | // ── Demo 5: concurrent deep-alloc fibers ───────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi/src/lib.rs | 40 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi/src/lib.rs | 42 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi/src/lib.rs | 66 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi/src/lib.rs | 68 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi/src/lib.rs | 113 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | examples/jspi/src/lib.rs | 115 | // ───────────────────────────────────────────────────────────────────────────── | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | guide/src/wasm-bindgen-test/benchmark.md | 20 | ### Step 1 - Add Dependency to Cargo.toml ### | COMMENT |
| LOW | guide/src/wasm-bindgen-test/benchmark.md | 29 | ### Step 2 - Add Benchmark ### | COMMENT |
| LOW | guide/src/wasm-bindgen-test/benchmark.md | 44 | ### Step 3 - Run Benchmark ### | COMMENT |
| LOW | guide/src/wasm-bindgen-test/benchmark.md | 64 | ### Step 4 - Optimize ### | COMMENT |
| LOW | guide/src/wasm-bindgen-test/benchmark.md | 105 | ### Step 5 - Asynchronous function ### | COMMENT |
| LOW | guide/src/wasm-bindgen-test/benchmark.md | 125 | ### Step 6 - Run benchmark in browser ### | COMMENT |
| LOW | guide/src/wasm-bindgen-test/benchmark.md | 129 | ### Step 7 - Configuration ### | COMMENT |
| LOW | src/rt/mod.rs | 1023 | // NOTE: This method is used to encode u32 into a variable-length-integer during the compile-time . | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/webidl/src/constants.rs | 1090 | "placeholder", | CODE |
| LOW | crates/webidl/src/constants.rs | 1286 | "placeholder", | CODE |
| LOW | crates/web-sys/src/features/gen_HtmlTextAreaElement.rs | 179 | js_name = "placeholder" | CODE |
| LOW | crates/web-sys/src/features/gen_HtmlTextAreaElement.rs | 191 | js_name = "placeholder" | CODE |
| LOW | crates/web-sys/src/features/gen_HtmlInputElement.rs | 408 | #[wasm_bindgen(method, getter, js_class = "HTMLInputElement", js_name = "placeholder")] | COMMENT |
| LOW | crates/web-sys/src/features/gen_HtmlInputElement.rs | 415 | #[wasm_bindgen(method, setter, js_class = "HTMLInputElement", js_name = "placeholder")] | COMMENT |
| LOW | examples/weather_report/src/lib.rs | 238 | .set_attribute("placeholder", "Type city name here") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | crates/js-sys/src/lib.rs | 5962 | /// It is a more robust version of the original, global isNaN(). | COMMENT |
| MEDIUM | src/cast.rs | 31 | /// In general this is intended to be a more robust version of | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/cli-support/src/js/mod.rs | 4202 | function GetOwnOrInheritedPropertyDescriptor(obj, id) { | CODE |
| LOW | crates/js-sys/tests/wait_async_mock.js | 6 | export function installNotifyOnlyWaitAsyncMock() { | CODE |
| LOW | crates/js-sys/tests/wasm/Promise.js | 86 | export async function testRustDoubleNumberPromise(rustModule) { | CODE |
| LOW | crates/cli/tests/reference/generic-import.bg.js | 707 | function GetOwnOrInheritedPropertyDescriptor(obj, id) { | CODE |
| LOW | examples/raytrace-parallel/server.py | 5 | class RequestHandler(SimpleHTTPRequestHandler): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/cli-support/src/interpreter/mod.rs | 259 | /// # Return value | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/js-sys/tests/wasm/JsString.rs | 649 | // TODO: Add test once we have optional parameters | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/cli-support/src/wit/mod.rs | 2816 | don't forget to recompile your Wasm file! Alternatively, you can update the | CODE |