Rust for Windows
This report summarizes scanner evidence for microsoft/windows-rs, a Rust project with 12,881 GitHub stars. SynthScan examined 1,961,850 lines of code across 3482 source files, recording 466 pattern matches distributed across 3 syntactic categories. The legacy adjusted pattern signal is 0.2 (Low 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.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 464 finding(s).
Are imports declared and package/API names verified? 2 finding(s).
Are wrappers, guards, and repeated structures necessary? 0 finding(s).
Which changes need focused human review? 466 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 466 distinct pattern matches across 3 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 | crates/tools/webview/src/main.rs | 21 | COMMENT | |
| LOW | crates/tools/composition/src/composition.txt | 1 | // Filter for windows-composition's bindings (Windows.UI.Composition, the SYSTEM | COMMENT |
| LOW | crates/tools/win32/src/sal.h | 1 | // Preserve SDK annotation evidence without replacing individual SAL contracts. | COMMENT |
| LOW | crates/tools/win32/src/sal.h | 21 | #define _SAL1_2_Source_(Name, args, annotes) __attribute__((annotate("windows_clang:sal:1.2:" #Name "\n" #args "\n" __wi | COMMENT |
| LOW | crates/tools/win32/src/sal.h | 41 | #undef _Valid_ | COMMENT |
| LOW | crates/tools/win32/src/sal.h | 61 | __windows_clang_structure("_At_buffer_", #target "," #iter "," #bound "," #annos, \ | COMMENT |
| LOW | crates/tools/win32/src/wdk.rs | 1 | use super::*; | COMMENT |
| LOW | crates/tools/package/src/lib.rs | 1 | //! Shared packaging logic for the published `windows` / `windows-sys` crates. | COMMENT |
| LOW | crates/tools/package/src/remap.rs | 1 | //! Header-based namespace remap for the published `windows` / `windows-sys` crates. | COMMENT |
| LOW | crates/tools/package/src/remap.rs | 21 | /// the flat winmd compiled from them, and the target namespace root the headers hang under. | COMMENT |
| LOW | crates/tools/package/src/main.rs | 1 | use tool_package::remap; | COMMENT |
| LOW | crates/tests/misc/no_std/src/lib.rs | 1 | #![cfg(windows)] | COMMENT |
| LOW | crates/tests/libs/interface/src/lib.rs | 1 | #![cfg(windows)] | COMMENT |
| LOW | crates/tests/libs/clang/input/validation_pruning.h | 1 | #ifndef FIELD_TYPE | COMMENT |
| LOW | crates/tests/libs/clang/input/sdk_adshlp.h | 1 | #include <intsafe.h> | COMMENT |
| LOW | crates/tests/libs/clang/input/macro_provenance.h | 1 | #define CHOICE 1 | COMMENT |
| LOW | crates/tests/libs/clang/input/publication_conflict.h | 1 | #ifndef TAG | COMMENT |
| LOW | crates/tests/libs/clang/input/opaque_packing.h | 1 | #if defined(PACK_TWO) | COMMENT |
| LOW | crates/tests/libs/clang/input/macro_recovery.h | 1 | #define A_BAD 1); struct { | COMMENT |
| LOW | crates/tests/libs/clang/input/reference_owned_values.h | 1 | #ifndef SHARED_CONSTANT | COMMENT |
| LOW | crates/tests/libs/clang/input/buffer_normalization.h | 1 | #ifndef VERSION | COMMENT |
| LOW | crates/tests/libs/clang/input/sdk_variadics.h | 1 | #include <intsafe.h> | COMMENT |
| LOW | crates/tests/libs/clang/input/function_selection.h | 1 | extern "C" int NativeA(int value); | COMMENT |
| LOW | crates/tests/libs/clang/input/enum_conflict_types.h | 1 | #ifndef BASE | COMMENT |
| LOW | crates/tests/libs/clang/input/enum_macro_collisions.h | 21 | #define PoolAligned PoolNxAligned | COMMENT |
| LOW | crates/tests/libs/clang/input/sdk_import_targets.h | 1 | #include <intsafe.h> | COMMENT |
| LOW | crates/tests/libs/clang/input/sdk_import_gaps.h | 1 | #include <intsafe.h> | COMMENT |
| LOW | crates/tests/libs/clang/input/annotation_merge.h | 1 | #define SAL(name, args) __attribute__((annotate( \ | COMMENT |
| LOW | crates/tests/libs/clang/input/union_family_types.h | 1 | #ifndef TAG | COMMENT |
| LOW | crates/tests/libs/clang/input/packing_families.h | 1 | #ifdef PACK_TWO | COMMENT |
| LOW | crates/tests/libs/clang/input/sdk_vss_classes.h | 1 | #include <intsafe.h> | COMMENT |
| LOW | crates/tests/libs/clang/input/reference_values.h | 1 | #ifndef FIELD_TYPE | COMMENT |
| LOW | crates/tests/libs/clang/input/macro_empty.h | 1 | #define EMPTY | COMMENT |
| LOW | crates/tests/libs/clang/input/macro_diagnostics.h | 1 | struct Anchor { int value; }; | COMMENT |
| LOW | crates/tests/libs/clang/input/macro_diagnostics.h | 21 | #define Q_GOOD 99 | COMMENT |
| LOW | crates/tests/libs/clang/input/macro_diagnostics.h | 41 | #define V_BAD15 Missing15 | COMMENT |
| LOW | crates/tests/libs/clang/input/macro_discovery.h | 1 | typedef unsigned short Code; | COMMENT |
| LOW | crates/tests/libs/clang/input/rpc_strings.h | 1 | #ifndef VERSION | COMMENT |
| LOW | crates/tests/libs/clang/input/bitfields_conflict.h | 1 | #ifndef TAG | COMMENT |
| LOW | crates/tests/libs/clang/input/packing.h | 1 | #pragma pack(push, 1) | COMMENT |
| LOW | crates/tests/libs/clang/input/visibility_conflict.h | 1 | #ifndef VISIBILITY | COMMENT |
| LOW | crates/tests/libs/clang/input/sdk_stillimage.h | 1 | #include <intsafe.h> | COMMENT |
| LOW | crates/tests/libs/clang/input/canonical_abi.h | 1 | #if defined(_M_IX86) | COMMENT |
| LOW | crates/tests/libs/clang/input/duplicate_functions.h | 1 | // Regression for windows-rs#4982. | COMMENT |
| LOW | crates/tests/libs/clang/input/reserved_parameters.h | 1 | #ifndef VERSION | COMMENT |
| LOW | crates/tests/libs/clang/input/buffer_postconditions.h | 1 | #ifndef VERSION | COMMENT |
| LOW | crates/tests/libs/clang/input/anonymous_enum_b.h | 1 | #ifndef BACKING | COMMENT |
| LOW | crates/tests/libs/clang/input/enum_forward.h | 1 | #define FLAGS __attribute__((annotate("windows_clang:sal:2:_Enum_is_bitflag_\n()\n()"))) | COMMENT |
| LOW | crates/tests/libs/clang/input/field_buffers.h | 1 | #ifndef VERSION | COMMENT |
| LOW | crates/tests/libs/clang/input/macro_initializers.h | 1 | #define PAIR_FIELDS 1, 2 | COMMENT |
| LOW | crates/tests/libs/clang/input/native_reference.h | 1 | #ifndef CASE | COMMENT |
| LOW | crates/tests/libs/clang/input/alignment_conflict.h | 1 | #ifndef REQUEST | COMMENT |
| LOW | …ates/tests/libs/clang/input/annotation_normalization.h | 1 | #ifdef LEGACY | COMMENT |
| LOW | crates/tests/libs/clang/input/conditional_length.h | 1 | #ifndef VERSION | COMMENT |
| LOW | crates/tests/libs/clang/input/reference_callback.h | 1 | #ifndef INPUT | COMMENT |
| LOW | crates/tests/libs/clang/input/function_names.h | 1 | #ifndef VARIANT | COMMENT |
| LOW | crates/tests/libs/clang/input/primary_ambiguous.h | 1 | #ifndef NAMES | COMMENT |
| LOW | crates/tests/libs/clang/input/alignment_forward.h | 1 | #ifndef REQUEST | COMMENT |
| LOW | crates/tests/libs/clang/input/target_imports.h | 1 | extern "C" int __stdcall Available(unsigned value); | COMMENT |
| LOW | …ates/tests/libs/clang/input/macro_discovery_override.h | 1 | #undef NUMBER | COMMENT |
| 403 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | crates/tests/interop/tests/rust.rs | 9 | reason = "the C++ and C# consumers use the compiled winmd and harness" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/libs/sys/src/Windows/Win32/propkey/mod.rs | 2408 | pub const SFGAOSTR_PLACEHOLDER: windows_sys::core::PCWSTR = windows_sys::core::w!("placeholder"); | CODE |
| LOW | crates/libs/windows/src/Windows/Win32/propkey/mod.rs | 2408 | pub const SFGAOSTR_PLACEHOLDER: windows_core::PCWSTR = windows_core::w!("placeholder"); | CODE |