Repository Analysis

PyO3/maturin

Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages

3.8 Likely human-written View on GitHub

Analysis Overview

This report presents the forensic synthetic code analysis of PyO3/maturin, a Rust project with 5,697 GitHub stars. SynthScan v2.0 examined 77,383 lines of code across 545 source files, recording 184 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 3.8 places this repository in the Likely human-written 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).

3.8
Adjusted Score
3.8
Raw Score
100%
Time Factor
2026-07-14
Last Push
5.7K
Stars
Rust
Language
77.4K
Lines of Code
545
Files
184
Pattern Hits
2026-07-14
Scan Date
0.01
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

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.

No multi-scan history yet — run the scanner again to build trend data.

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 4HIGH 1MEDIUM 19LOW 160

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 184 distinct pattern matches across 13 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 Block113 hits · 113 pts
SeverityFileLineSnippetContext
LOWdeny.toml1# This template contains all of the possible sections and their default valuesCOMMENT
LOWdeny.toml21# `target_family = "unix"` configuration, that only having windows targets inCOMMENT
LOWdeny.toml41# from the view of cargo-deny. This is an extremely heavy hammer, as if a crateCOMMENT
LOWdeny.toml61# option can be used to specify the depth at which feature edges will be added.COMMENT
LOWdeny.toml81 #"a-crate-that-is-yanked@0.1.1", # you can also ignore yanked crate versions if you wishCOMMENT
LOWdeny.toml121 # Each entry is the crate and version constraint, and its specific allowCOMMENT
LOWdeny.toml141# the license expression. If the contents match, the clarification will be usedCOMMENT
LOWdeny.toml161# is only published to private registries, and ignore is true, the crate willCOMMENT
LOWdeny.toml181# The default lint level for `default` features for crates that are members ofCOMMENT
LOWdeny.toml201]COMMENT
LOWdeny.toml221#]COMMENT
LOWdeny.toml241# More documentation about the 'sources' section can be found here:COMMENT
LOWguide/src/config.md21# Features can also be conditional on the target Python versionCOMMENT
LOWguide/src/config.md61auditwheel = "repair"COMMENT
LOWtests/common/integration.rs21///COMMENT
LOW.github/workflows/test.yml241 bin/maturin build -i python3.12 -m test-crates/pyo3-mixed/Cargo.toml --target x86_64-pc-windows-msvcCOMMENT
LOWsrc/cargo_options.rs81COMMENT
LOWsrc/cross_compile.rs101///COMMENT
LOWsrc/build_options.rs21 #[arg(short = 'f', long, conflicts_with = "interpreter")]COMMENT
LOWsrc/build_options.rs41 /// PyPI are used. The linux-specific options are `manylinux` tags (for exampleCOMMENT
LOWsrc/build_options.rs61 pub auditwheel: Option<AuditWheelMode>,COMMENT
LOWsrc/build_options.rs81#[serde(default)]COMMENT
LOWsrc/build_options.rs101///COMMENT
LOWsrc/metadata.rs21/// The metadata required to generate the .dist-info directoryCOMMENT
LOWsrc/lib.rs1//! Builds wheels from a crate that exposes python bindings through pyo3COMMENT
LOWsrc/upload.rs21use std::time::Duration;COMMENT
LOWsrc/upload.rs41 ///COMMENT
LOWsrc/upload.rs81 }COMMENT
LOWsrc/project_layout.rs21 /// Contains the canonicalized (i.e. absolute) path to the python part of the projectCOMMENT
LOWsrc/project_layout.rs301 format!(COMMENT
LOWsrc/pyproject_toml.rs21}COMMENT
LOWsrc/pyproject_toml.rs61/// A glob pattern for the include and exclude configuration.COMMENT
LOWsrc/pyproject_toml.rs141}COMMENT
LOWsrc/pyproject_toml.rs161 /// Binary executable targetCOMMENT
LOWsrc/pyproject_toml.rs201 pub macos_deployment_target: Option<String>,COMMENT
LOWsrc/pyproject_toml.rs221 /// Generate an SBOM for Rust crates. Defaults to `true`.COMMENT
LOWsrc/pyproject_toml.rs241/// features = [COMMENT
LOWsrc/pyproject_toml.rs341/// TODO: add fields like `target_os`, `target_arch`, etc. forCOMMENT
LOWsrc/pyproject_toml.rs361 /// Patterns are resolved relative to the directory containing `pyproject.toml`.COMMENT
LOWsrc/pyproject_toml.rs381 /// Source distribution generatorCOMMENT
LOWsrc/pyproject_toml.rs401 /// Each entry can be a plain feature name string, or a conditional objectCOMMENT
LOWsrc/pyproject_toml.rs421 //COMMENT
LOWsrc/pyproject_toml.rs441#[derive(Serialize, Deserialize, Debug, Clone, Default)]COMMENT
LOWsrc/pyproject_toml.rs481/// Shared CI configuration overrides used by both platform-level andCOMMENT
LOWsrc/pyproject_toml.rs501 /// Extra arguments to pass to maturinCOMMENT
LOWsrc/pyproject_toml.rs521#[serde(rename_all = "kebab-case")]COMMENT
LOWsrc/main.rs41struct Opt {COMMENT
LOWsrc/main.rs61 #[command(name = "build", alias = "b")]COMMENT
LOWsrc/main.rs81 pgo: bool,COMMENT
LOWsrc/main.rs101 #[arg(long)]COMMENT
LOWsrc/main.rs121 /// This command is a workaround for [pypa/pip#6041](https://github.com/pypa/pip/issues/6041)COMMENT
LOWsrc/main.rs141 /// Create a new cargo projectCOMMENT
LOWsrc/main.rs161 publish: PublishOpt,COMMENT
LOWsrc/main.rs181 /// The commands are meant to be called from the python PEP 517COMMENT
LOWsrc/compile.rs61 /// Library search paths for this architectureCOMMENT
LOWsrc/compile.rs81#[derive(Debug, Clone)]COMMENT
LOWsrc/compile.rs101 /// `copy_back_cargo_outputs` has restored unpatched bytes at theCOMMENT
LOWsrc/compile.rs121 /// per-arch dependency analysis during macOS wheel repair.COMMENT
LOWsrc/build_context/repair.rs321 /// path becomes empty until [`finalize_staged_artifacts`] renames itCOMMENT
LOWsrc/build_context/repair.rs341 let maturin_build = crate::compile::ensure_target_maturin_dir(&self.project.target_dir);COMMENT
53 more matches not shown…
Modern AI Meta-Vocabulary18 hits · 68 pts
SeverityFileLineSnippetContext
MEDIUMCargo.toml113# project scaffolding, maturin new/init/generate-ciCOMMENT
MEDIUMCargo.toml213# project scaffoldingCOMMENT
MEDIUMtests/cli.rs18 #[cfg(not(feature = "scaffolding"))]COMMENT
MEDIUMtests/cli.rs25 #[cfg(not(all(feature = "upload", feature = "zig", feature = "scaffolding")))]COMMENT
MEDIUMsrc/lib.rs43#[cfg(feature = "scaffolding")]COMMENT
MEDIUMsrc/lib.rs63#[cfg(feature = "scaffolding")]COMMENT
MEDIUMsrc/lib.rs73#[cfg(feature = "scaffolding")]COMMENT
MEDIUMsrc/main.rs18#[cfg(feature = "scaffolding")]COMMENT
MEDIUMsrc/main.rs133 #[cfg(feature = "scaffolding")]COMMENT
MEDIUMsrc/main.rs142 #[cfg(feature = "scaffolding")]COMMENT
MEDIUMsrc/main.rs150 #[cfg(feature = "scaffolding")]COMMENT
MEDIUMsrc/main.rs262 #[cfg(feature = "scaffolding")]COMMENT
MEDIUMsrc/main.rs264 #[cfg(feature = "scaffolding")]COMMENT
MEDIUMsrc/main.rs266 #[cfg(feature = "scaffolding")]COMMENT
MEDIUMsrc/commands/mod.rs9#[cfg(feature = "scaffolding")]COMMENT
MEDIUMsrc/commands/mod.rs66#[cfg(feature = "scaffolding")]COMMENT
MEDIUMsrc/commands/mod.rs73#[cfg(feature = "scaffolding")]COMMENT
MEDIUMsrc/commands/mod.rs80#[cfg(feature = "scaffolding")]COMMENT
Hallucination Indicators4 hits · 55 pts
SeverityFileLineSnippetContext
CRITICALsrc/build_orchestrator.rs521 self.context.project.project_layout.data.as_deref(),CODE
CRITICALsrc/build_orchestrator.rs825 if !self.context.project.metadata24.scripts.is_empty() {CODE
CRITICALsrc/build_orchestrator.rs831 if !self.context.project.metadata24.entry_points.is_empty() {CODE
CRITICALsrc/build_orchestrator.rs835 if self.context.project.project_layout.python_module.is_some() {CODE
Unused Imports21 hits · 21 pts
SeverityFileLineSnippetContext
LOWmaturin/bootstrap.py12CODE
LOWmaturin/bootstrap.py19CODE
LOWmaturin/__init__.py11CODE
LOWmaturin/__main__.py1CODE
LOW…licit/python/cffi_mixed_implicit/some_rust/__init__.py1CODE
LOW…licit/python/cffi_mixed_implicit/some_rust/__init__.py1CODE
LOW…ixed-py-subdir/python/cffi_mixed_py_subdir/__init__.py1CODE
LOW…ixed-py-subdir/python/cffi_mixed_py_subdir/__init__.py1CODE
LOWtest-crates/uniffi-mixed/uniffi_mixed/__init__.py1CODE
LOWtest-crates/cffi-mixed/cffi_mixed/__init__.py1CODE
LOWtest-crates/cffi-mixed/cffi_mixed/__init__.py1CODE
LOWtest-crates/cffi-mixed/cffi_mixed/__init__.py2CODE
LOW…xed-with-path-dep/cffi_mixed_with_path_dep/__init__.py1CODE
LOW…xed-with-path-dep/cffi_mixed_with_path_dep/__init__.py1CODE
LOW…t-crates/cffi-mixed-src/src/cffi_mixed_src/__init__.py1CODE
LOW…t-crates/cffi-mixed-src/src/cffi_mixed_src/__init__.py1CODE
LOWtest-crates/pyo3-mixed/pyo3_mixed/__init__.py1CODE
LOW…/cffi-mixed-submodule/cffi_mixed_submodule/__init__.py1CODE
LOW…submodule/cffi_mixed_submodule/rust_module/__init__.py1CODE
LOW…include-exclude/cffi_mixed_include_exclude/__init__.py1CODE
LOW…include-exclude/cffi_mixed_include_exclude/__init__.py1CODE
Modern Structural Boilerplate8 hits · 8 pts
SeverityFileLineSnippetContext
LOW…licit/python/cffi_mixed_implicit/some_rust/__init__.py3__all__ = ["ffi", "lib"]CODE
LOW…ixed-py-subdir/python/cffi_mixed_py_subdir/__init__.py3__all__ = ["ffi", "lib"]CODE
LOWtest-crates/cffi-mixed/cffi_mixed/__init__.py4__all__ = ["ffi", "lib", "Line"]CODE
LOW…xed-with-path-dep/cffi_mixed_with_path_dep/__init__.py3__all__ = ["ffi", "lib"]CODE
LOW…t-crates/cffi-mixed-src/src/cffi_mixed_src/__init__.py3__all__ = ["ffi", "lib"]CODE
LOW…/cffi-mixed-submodule/cffi_mixed_submodule/__init__.py3__all__ = ["rust"]CODE
LOW…submodule/cffi_mixed_submodule/rust_module/__init__.py3__all__ = ["rust"]CODE
LOW…include-exclude/cffi_mixed_include_exclude/__init__.py3__all__ = ["ffi", "lib"]CODE
Hyper-Verbose Identifiers6 hits · 6 pts
SeverityFileLineSnippetContext
LOWnoxfile.py94def _resolve_pyodide_platform_inputs(info: dict) -> dict:CODE
LOWmaturin/bootstrap.py22def get_requires_for_build_wheel(config_settings: dict[str, Any] | None = None) -> list[str]:CODE
LOWmaturin/bootstrap.py28def get_requires_for_build_sdist(config_settings: dict[str, Any] | None = None) -> list[str]:CODE
LOWmaturin/__init__.py165def get_requires_for_build_wheel(config_settings: Optional[Mapping[str, Any]] = None) -> List[str]:CODE
LOWmaturin/__init__.py189def get_requires_for_build_sdist(config_settings: Optional[Mapping[str, Any]] = None) -> List[str]:CODE
LOWmaturin/__init__.py197def prepare_metadata_for_build_wheel(CODE
Verbosity Indicators4 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/common/other.rs718 // Step 1: Build the sdistCOMMENT
LOWtests/common/other.rs742 // Step 2: Unpack sdist and build wheels from itCOMMENT
LOWsrc/python_interpreter/resolver.rs240 // Step 1: PYO3_CONFIG_FILE is an explicit override that trumps everythingCOMMENT
LOWsrc/python_interpreter/resolver.rs255 // Step 2: Discover candidates (unified for native/cross)COMMENT
Structural Annotation Overuse4 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/common/other.rs718 // Step 1: Build the sdistCOMMENT
LOWtests/common/other.rs742 // Step 2: Unpack sdist and build wheels from itCOMMENT
LOWsrc/python_interpreter/resolver.rs240 // Step 1: PYO3_CONFIG_FILE is an explicit override that trumps everythingCOMMENT
LOWsrc/python_interpreter/resolver.rs255 // Step 2: Discover candidates (unified for native/cross)COMMENT
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHtest-crates/cffi-mixed/test_cffi_mixed.py25 assert line.length() == 5CODE
Overly Generic Function Names2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtest-crates/pyo3-pure/tests/test_pyo3_pure.py16def test_function():CODE
LOWtest-crates/pyo3-abi3t/tests/test_pyo3_abi3t.py16def test_function():CODE
Self-Referential Comments1 hit · 2 pts
SeverityFileLineSnippetContext
MEDIUMsrc/ci/github/render.rs147 "# This file is autogenerated by maturin v{version}CODE
Redundant / Tautological Comments1 hit · 2 pts
SeverityFileLineSnippetContext
LOW.github/workflows/test.yml576 # Check if all needs were successful or skipped.COMMENT
Deep Nesting1 hit · 1 pts
SeverityFileLineSnippetContext
LOWnoxfile.py40CODE