egui: an easy-to-use immediate mode GUI in Rust that runs on both web and native
This report presents the forensic synthetic code analysis of emilk/egui, a Rust project with 29,639 GitHub stars. SynthScan v2.0 examined 132,080 lines of code across 530 source files, recording 733 pattern matches distributed across 9 syntactic categories. The overall adjusted score of 5.9 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).
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.
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 733 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.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | lychee.toml | 1 | ################################################################################ | COMMENT |
| LOW | deny.toml | 1 | # Copied from https://github.com/rerun-io/rerun_template | COMMENT |
| LOW | clippy.toml | 21 | COMMENT | |
| LOW | crates/eframe/Cargo.toml | 41 | # Allow crates to choose an android-activity backend via Winit | COMMENT |
| LOW | crates/eframe/Cargo.toml | 81 | ## Enable [`wgpu`](https://docs.rs/wgpu) for painting (via [`egui-wgpu`](https://github.com/emilk/egui/tree/main/crates/ | COMMENT |
| LOW | crates/eframe/src/lib.rs | 1 | //! eframe - the [`egui`] framework crate | COMMENT |
| LOW | crates/eframe/src/lib.rs | 21 | //! If your app is only for native, and you don't need advanced features like state persistence, | COMMENT |
| LOW | crates/eframe/src/lib.rs | 41 | //! // for e.g. egui::PaintCallback. | COMMENT |
| LOW | crates/eframe/src/lib.rs | 61 | //! # #[cfg(target_arch = "wasm32")] | COMMENT |
| LOW | crates/eframe/src/lib.rs | 81 | //! } | COMMENT |
| LOW | crates/eframe/src/lib.rs | 101 | //! } | COMMENT |
| LOW | crates/eframe/src/lib.rs | 121 | //! | COMMENT |
| LOW | crates/eframe/src/lib.rs | 241 | /// This is how you start a native (desktop) app. | COMMENT |
| LOW | crates/eframe/src/lib.rs | 261 | /// #[derive(Default)] | COMMENT |
| LOW | crates/eframe/src/lib.rs | 281 | /// ``` | COMMENT |
| LOW | crates/eframe/src/lib.rs | 321 | #[cfg(feature = "wgpu_no_default_features")] | COMMENT |
| LOW | crates/eframe/src/lib.rs | 341 | /// eventloop.set_control_flow(ControlFlow::Poll); | COMMENT |
| LOW | crates/eframe/src/lib.rs | 361 | /// } | COMMENT |
| LOW | crates/eframe/src/lib.rs | 441 | /// The simplest way to get started when writing a native app. | COMMENT |
| LOW | crates/eframe/src/lib.rs | 461 | /// ui.text_edit_singleline(&mut name) | COMMENT |
| LOW | crates/eframe/src/icon_data.rs | 1 | //! Helpers for loading [`egui::IconData`]. | COMMENT |
| LOW | crates/eframe/src/epi.rs | 21 | #[cfg(not(target_arch = "wasm32"))] | COMMENT |
| LOW | crates/eframe/src/epi.rs | 61 | pub integration_info: IntegrationInfo, | COMMENT |
| LOW | crates/eframe/src/epi.rs | 81 | /// | COMMENT |
| LOW | crates/eframe/src/epi.rs | 141 | /// | COMMENT |
| LOW | crates/eframe/src/epi.rs | 161 | fn logic(&mut self, ctx: &egui::Context, frame: &mut Frame) { | COMMENT |
| LOW | crates/eframe/src/epi.rs | 181 | /// | COMMENT |
| LOW | crates/eframe/src/epi.rs | 201 | /// | COMMENT |
| LOW | crates/eframe/src/epi.rs | 221 | #[cfg(not(feature = "glow"))] | COMMENT |
| LOW | crates/eframe/src/epi.rs | 241 | /// You can use [`egui::Color32::to_normalized_gamma_f32`] for this. | COMMENT |
| LOW | crates/eframe/src/epi.rs | 261 | /// It can be used to prevent specific keyboard shortcuts or mouse events from being processed by egui. | COMMENT |
| LOW | crates/eframe/src/epi.rs | 281 | /// | COMMENT |
| LOW | crates/eframe/src/epi.rs | 301 | /// Must be a power-of-two. Higher = more smooth 3D. | COMMENT |
| LOW | crates/eframe/src/epi.rs | 321 | #[cfg(any(feature = "glow", feature = "wgpu_no_default_features"))] | COMMENT |
| LOW | crates/eframe/src/epi.rs | 341 | /// event loop before it is run. | COMMENT |
| LOW | crates/eframe/src/epi.rs | 381 | /// Dithering assumes an sRGB output and thus will apply noise to any input value that lies between | COMMENT |
| LOW | crates/eframe/src/epi.rs | 481 | /// Unused by webgl context as of writing. | COMMENT |
| LOW | crates/eframe/src/epi.rs | 501 | /// two 8bit values after applying the sRGB OETF function, i.e. if it's not a whole 8bit value in "gamma space". | COMMENT |
| LOW | crates/eframe/src/epi.rs | 761 | self.window.as_ref() | COMMENT |
| LOW | crates/eframe/src/epi.rs | 781 | /// Register your own [`glow::Texture`], | COMMENT |
| LOW | crates/eframe/src/epi.rs | 841 | /// The full URL (`location.href`) without the hash, percent-decoded. | COMMENT |
| LOW | crates/eframe/src/epi.rs | 861 | /// `location.port` | COMMENT |
| LOW | crates/eframe/src/epi.rs | 881 | /// "foo=hello&bar%20&foo=world" is parsed as `{"bar ": [""], "foo": ["hello", "world"]}` | COMMENT |
| LOW | crates/eframe/src/native/app_icon.rs | 41 | /// We did not set it or failed to do it. In any case we won't try again. | COMMENT |
| LOW | crates/eframe/src/native/winit_integration.rs | 121 | /// be used in special situations if the window must be repainted while | COMMENT |
| LOW | crates/eframe/src/native/winit_integration.rs | 141 | /// # Warning | COMMENT |
| LOW | crates/eframe/src/native/macos.rs | 1 | use egui::Vec2; | COMMENT |
| LOW | crates/eframe/src/native/wgpu_integration.rs | 841 | COMMENT | |
| LOW | crates/eframe/src/native/glow_integration.rs | 801 | COMMENT | |
| LOW | crates/eframe/src/web/web_runner.rs | 221 | }; | COMMENT |
| LOW | crates/eframe/src/web/web_painter.rs | 1 | use egui::{Event, UserData}; | COMMENT |
| LOW | crates/eframe/src/web/web_logger.rs | 81 | COMMENT | |
| LOW | crates/eframe/src/web/web_logger.rs | 101 | COMMENT | |
| LOW | crates/eframe/src/web/text_agent.rs | 61 | // We do this instead of setting the `autofocus` attribute, | COMMENT |
| LOW | crates/egui_glow/src/painter.rs | 101 | /// Stores outdated OpenGL textures that are yet to be deleted | COMMENT |
| LOW | crates/egui_glow/src/painter.rs | 121 | impl CallbackFn { | COMMENT |
| LOW | crates/egui_glow/src/painter.rs | 281 | self.max_texture_side | COMMENT |
| LOW | crates/egui_glow/src/painter.rs | 381 | /// The following OpenGL features will be set: | COMMENT |
| LOW | crates/egui_glow/src/lib.rs | 21 | COMMENT | |
| LOW | crates/egui_glow/src/lib.rs | 101 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] | COMMENT |
| 627 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | clippy.toml | 3 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | clippy.toml | 22 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | clippy.toml | 60 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | crates/eframe/Cargo.toml | 145 | # ------------------------------------------- | COMMENT |
| MEDIUM | crates/eframe/Cargo.toml | 201 | # ------------------------------------------- | COMMENT |
| MEDIUM⚡ | crates/emath/src/rect_align.rs | 10 | /// ┌───────────┐ ┌────────┐ ┌─────────┐ | COMMENT |
| MEDIUM⚡ | crates/emath/src/rect_align.rs | 12 | /// └───────────┘ └────────┘ └─────────┘ | COMMENT |
| MEDIUM⚡ | crates/emath/src/rect_align.rs | 13 | /// ┌──────────┐ ┌────────────────────────────────────┐ ┌───────────┐ | COMMENT |
| MEDIUM⚡ | crates/emath/src/rect_align.rs | 15 | /// └──────────┘ │ │ └───────────┘ | COMMENT |
| MEDIUM⚡ | crates/emath/src/rect_align.rs | 16 | /// ┌──────────┐ │ │ ┌───────────┐ | COMMENT |
| MEDIUM⚡ | crates/emath/src/rect_align.rs | 18 | /// └──────────┘ │ │ └───────────┘ | COMMENT |
| MEDIUM⚡ | crates/emath/src/rect_align.rs | 19 | /// ┌──────────┐ │ │ ┌───────────┐ | COMMENT |
| MEDIUM⚡ | crates/emath/src/rect_align.rs | 21 | /// └──────────┘ └────────────────────────────────────┘ └───────────┘ | COMMENT |
| MEDIUM⚡ | crates/emath/src/rect_align.rs | 22 | /// ┌────────────┐ ┌──────┐ ┌──────────┐ | COMMENT |
| MEDIUM⚡ | crates/emath/src/rect_align.rs | 24 | /// └────────────┘ └──────┘ └──────────┘ | COMMENT |
| MEDIUM | scripts/check.sh | 81 | # ------------------------------------------------------------ | COMMENT |
| MEDIUM | scripts/clippy_wasm/clippy.toml | 6 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/clippy_wasm/clippy.toml | 25 | # ----------------------------------------------------------------------------- | COMMENT |
| MEDIUM | .github/workflows/rust.yml | 67 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | .github/workflows/rust.yml | 124 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | .github/workflows/rust.yml | 156 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | .github/workflows/rust.yml | 178 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | .github/workflows/rust.yml | 199 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | .github/workflows/rust.yml | 218 | # --------------------------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | crates/eframe/src/native/glow_integration.rs | 1013 | // Create GL display. This may probably create a window too on most platforms. Definitely on `MS windows`. Never | COMMENT |
| MEDIUM | crates/egui_kittest/src/lib.rs | 767 | /// See also: <https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-harness-field> | COMMENT |
| MEDIUM | crates/egui_kittest/src/lib.rs | 801 | See: https://doc.rust-lang.org/cargo/reference/cargo-targets.html#the-harness-field" | CODE |
| MEDIUM | crates/egui_kittest/src/snapshot.rs | 755 | /// # let harness = MockHarness; | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | crates/egui_demo_lib/src/lib.rs | 59 | pub const LOREM_IPSUM: &str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt | CODE |
| LOW⚡ | crates/egui_demo_lib/src/lib.rs | 59 | pub const LOREM_IPSUM: &str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt | CODE |
| LOW⚡ | crates/egui_demo_lib/src/lib.rs | 61 | pub const LOREM_IPSUM_LONG: &str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incid | CODE |
| LOW⚡ | crates/egui_demo_lib/src/lib.rs | 61 | pub const LOREM_IPSUM_LONG: &str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incid | CODE |
| LOW | crates/egui_demo_lib/src/demo/text_layout.rs | 132 | ui.selectable_value(lorem_ipsum, true, "Lorem Ipsum"); | CODE |
| LOW | crates/egui_demo_lib/src/demo/modals.rs | 21 | name: "John Doe".to_owned(), | CODE |
| LOW | examples/custom_font_style/src/main.rs | 73 | pub const LOREM_IPSUM: &str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt | CODE |
| LOW | examples/custom_font_style/src/main.rs | 73 | pub const LOREM_IPSUM: &str = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | scripts/accept_snapshots.sh | 3 | # Its main use is in the update_kittest_snapshots CI job, but you can also use it locally. | COMMENT |
| MEDIUM | scripts/build_demo_web.sh | 99 | # if this fails with "error: cannot import from modules (`env`) with `--no-modules`", you can use: | COMMENT |
| LOW | .vscode/settings.json | 24 | // Don't forget to put it in a comment again before committing. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/generate_changelog.py | 136 | CODE | |
| LOW | scripts/generate_changelog.py | 244 | CODE | |
| LOW | scripts/lint.py | 153 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | .github/workflows/enforce_branch_name.yml | 20 | # Check if PR is from a fork | COMMENT |
| LOW | .github/workflows/enforce_branch_name.yml | 22 | # Check if PR is from the master/main branch of a fork | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | crates/egui_kittest/src/snapshot.rs | 44 | /// Example usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/generate_changelog.py | 49 | def fetch_pr_info_from_commit_info(commit_info: CommitInfo) -> Optional[PrInfo]: | CODE |