PistonDevelopers/piston
62.5
Adequate · 14 November 2026
4k
lines of production code
Rust
primary language
5
measurements over time
What this system is
This system is the Piston core library, a Rust-based framework providing foundational components for game development and interactive applications. It unifies event handling, input processing, and window management through a modular, trait-based architecture that supports diverse input types and precise control over the application loop. The system enables developers to build cross-platform applications by managing window states, processing standardized input events, and orchestrating update and render cycles.
Features
Initial release of the Piston core library
This entry introduces the Piston core library, establishing the foundational module structure for the framework. It re-exports the \event\_loop\, \input\, and \window\ crates, making their public APIs available under the \piston\ namespace. This allows users to access core event handling, input processing, and window management capabilities through a single, unified import.
src · high confidence
Behavioural changes
Add CI script for testing, building, and documenting the project
A new CI script (ci/script.sh) has been added to automate the continuous integration pipeline. This script executes tests within the src/input directory, builds the project, and generates documentation, ensuring these steps are performed consistently in the CI environment.
ci · high confidence
Input system redesigned with modular event traits and unified event types
The input library has been completely restructured to use a modular, trait-based event system. Input events (such as button presses, mouse movement, text input, and window focus/close) are now defined by specific traits (e.g., \ButtonEvent\, \CloseEvent\, \FocusEvent\) that implement \From\ and \Into\ conversions for the unified \Event\ enum. Loop events (render, update, idle, after-render) are similarly abstracted into their own traits. This change introduces a new \GenericEvent\ trait that aggregates all event types, allowing applications to handle any input through a single interface. Additionally, the system now supports controller axis events, file drag-and-drop, and 3D touch input, with all event arguments standardized to use \f64\ for coordinates and timestamps.
src/input/src · high confidence
Redesigned event loop with new state machine and settings
The event loop implementation has been redesigned, introducing a new \EventSettings\ struct to configure frame rates, update rates, and modes like benchmark and lazy rendering. The core loop now uses an explicit \State\ enum to manage the flow between handling events, updating, and rendering, replacing the previous logic. This change affects how input is polled and how idle/render events are emitted, particularly in lazy or benchmark modes.
_src/event\loop/src · high confidence
Window API refactoring and new control methods
The windowing library introduces several behavioral changes and new capabilities. The \Size\ structure now uses \f64\ for width and height instead of integer types, affecting how window dimensions are handled and converted. A new \BuildFromWindowSettings\ trait allows windows to be constructed directly from settings objects, replacing the previous \new\ pattern. The \Window\ trait gains a \set\_should\_close\ method for programmatic window closing, and the \AdvancedWindow\ trait expands with methods to control window visibility (\show\, \hide\), position (\set\_position\), size (\set\_size\), and automatic closing behavior (\set\_automatic\_close\). Additionally, the \NoWindow\ implementation now supports these new settings and methods, enabling headless event loops to respect window configuration.
src/window/src · high confidence
Test coverage
Added benchmarks for input event processing; Added serialization round-trip tests for input and loop events.
Dependencies
Piston 1.0.0 release with Rust 2018 edition and modular workspace structure
The Piston game engine core libraries have been updated to version 1.0.0, migrating to the Rust 2018 edition. The project is now organized as a Cargo workspace containing three core crates: \pistoncore-input\ (version 1.0.1), \pistoncore-window\ (version 1.0.0), and \pistoncore-event\_loop\ (version 1.0.0). The event loop crate introduces optional features for asynchronous operation via \tokio\ (version 1.53.1) and precise sleeping via \spin\_sleep\ (version 1.3.3). The input crate now depends on \bitflags\ 1.0.0 and \piston-viewport\ 1.0.0, with optional \serde\ support for serialization. The window crate depends on \piston-graphics\_api\_version\ 1.0.0.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 61 → 62 (+1.1)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.
Lenses
- Code Health 99 → 98 (-1.1)
- Architecture 100 → 100 (+0.0)
- Maturity 45 → 45 (+0.0)
- Readiness 54 → 59 (+4.7)
- Security 95 → 95 (+0.0)
- Performance 91 → 91 (+0.0)
New (11)
- Edited copies of one member (3 members, 6+ corresponding lines) (src/input/src/controller.rs)
- Edited copies of one member (3 members, 8+ corresponding lines) (src/input/src/controller.rs)
- Edited copies of one member (6 members, 6+ corresponding lines) (src/input/src/button.rs)
- Edited copy of a member (6 corresponding lines) (src/input/src/idle.rs)
- Low coverage: src/event_loop/src/lib.rs (src/event_loop/src/lib.rs)
- Low coverage: src/input/src/generic_event.rs (src/input/src/generic_event.rs)
- Low coverage: src/input/src/lib.rs (src/input/src/lib.rs)
- Low coverage: src/input/src/render.rs (src/input/src/render.rs)
- Low coverage: src/input/src/resize.rs (src/input/src/resize.rs)
- Low coverage: src/window/src/lib.rs (src/window/src/lib.rs)
- Low coverage: src/window/src/no_window.rs (src/window/src/no_window.rs)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
PistonDevelopers/piston was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit 21b8719a0606bb4e8612c36a2016e5b685c609f9 — the exact code this score is about.
- Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-e1a3b69fc8ee.