PistonDevelopers/piston
59.6
Adequate · 30 September 2026
4k
lines of production code
Rust
primary language
2
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 watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 62 → 60 (-2.5)
- Rubric changed (rubric-2026.09.11 → rubric-2026.09.18) — scores are not directly comparable.
Lenses
- Code Health 99 → 99 (+0.0)
- Architecture 100 → 100 (+0.0)
- Maturity 48 → 43 (-4.9)
- Readiness 49 → 52 (+2.6)
- Security 95 → 95 (+0.0)
- Performance 91 (new)
Resolved (2)
- Documentation: no installation or build instructions (README.md)
- Documentation: no usage examples (README.md)
New (6)
- Ambiguous naming for synchronous vs asynchronous operations. next and async_next are not standard naming conventions for distinguishing blocking vs non-blocking behavior. Typically, next implies blocking (or synchronous) and poll or try_next implies non-blocking. async_next suggests an async runtime context, but the return type is Event (not Future), making the distinction unclear.
- Dependency hygiene PARTLY measured — Cargo dependencies read, no committed lock to grade for currency
- Inconsistent event retrieval methods across Events and Window types. Events has next/async_next, while Window has wait_event/wait_event_timeout/poll_event. These perform the same logical operation (retrieving the next event) but have different names and signatures, forcing users to learn two different APIs for the same domain.
- Incorrect return types in accessor methods. The methods mouse_cursor_args, mouse_relative_args, and mouse_scroll_args return Scancode, but based on the from_pos constructors and typical semantics, these events should return position data (e.g., [f64; 2]). Returning Scancode (a keyboard key code) for mouse events is semantically incorrect and likely a bug or copy-paste error.
- Redundant setter methods for graphics API. Both set_maybe_graphics_api and set_graphics_api exist with similar signatures. The distinction between 'maybe' and direct setting is unclear and likely confusing. If one is for optional APIs and the other for required, the naming should reflect that (e.g., with_optional_api vs with_api).
- Redundant setter methods. The EventLoop type exposes both a void-returning set_ups and a builder-style ups method for the same configuration parameter. This pattern is repeated for ups_reset, max_fps, swap_buffers, bench_mode, and lazy. Users must choose between two different idioms for the same operation.
Written by watchdog.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 30 September 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.09.18 — the same rubric and the same method as every other entry in this index.
- Measured by watchdog.canine.dev using codehealth-analyzer preprod-cb25ca4feafa.