NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
crates.io · #3583 most downloaded on crates.io
Game Input Library for Rust
Last release 4 months ago
30 May 2026
Release timing varies
gaps range from 9 days to 1.3 years
Most releases are documented
notes for 31 of 39 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
39 releases · first in 2016
Always use forward slash in include/include_str!
include/include_str!Updated bundled mappings. (!167)
LinuxGamepadExt trait with devpath method. (!166, !167)GilrsBuilder::with_force_feedback. (!165)One column per quarter.
Mark Error enums, EventType and Event as non_exhaustive
EventType and Event as non_exhaustiveEventType::ForceFeedbackEffectCompletedbtn_valueNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
axis_dpad_to_button filter will now properly generate release event when axis value change from -1 to 1 (or 1 to -1) while skipping 0.
axis_dpad_to_button filter will now properly generate release event when
axis value change from -1 to 1 (or 1 to -1) while skipping 0.Added vendor_id() and product_id() to Gamepad.
vendor_id() and product_id() to Gamepad.Fixed Gilrs::set_mapping* returning MappingError::NotConnected for connected gamepads.
Gilrs::set_mapping* returning MappingError::NotConnected for
connected gamepads.All thread spawned by gilrs are now named. (!102)
Parse more SDL specific buttons in mappings
Gilrs::next_event_blocking()Supporting files and documentation for running the GUI example using Wasm in a browser. See examples/wasm/README.md
Windows now defaults to using Windows Gaming Input instead of xinput.
Windows now defaults to using Windows Gaming Input instead of xinput.
If you need to use xInput you can disable the wgi feature (It's enabled by
default) and enable the xinput feature.
gilrs = {version = "0.10.0", default-features = false, features = ["wgi"]}
Apps on Windows will now require a focused window to receive inputs by default.
This is a limitation of Windows Gaming Input. It requires an in focus Window
be associated with the process to receive events. You can still switch back
to using xInput by turning off default features and enabling the xinput
feature.
Note: Some (Older?) devices may still report inputs without a window but this
is not the case for all devices so if you are writing a terminal based game,
use the xinput feature instead.
Minimal supported rust version is now 1.64.
wasm: web-sys/wasm-bindgen is now used by default, dependency on stdweb and wasm-bindgen feature are removed.
wasm-bindgen feature are removed.impl Into\<usize\> for GamepadId
to impl From\<GamepadId\> for usizenext_event() no longer panic if getGamepads() is not available.Minimal supported rust version is now 1.47
axis_dpad_to_btn now also emits ButtonChanged events### Changed - Updated bundled mappings
Errors now longer implement deprecated methods (source() and description()).
Jitter, Repeat, GilrsBuilder, and Mapping now implement Default.source().Code now implements Deserialize and Serialize (@theunkn0wn1).#[non_exhaustive] instead of hidden variant.serde to serde-serialize.source()
and description()).Added method to stop playing force feedback effect. (@photex)
Added support for serialization and deserialization for Button, Axis and AxisOrButton with optional serde feature (@aleksijuvani).
Button, Axis
and AxisOrButton with optional serde feature (@aleksijuvani).LeftTrigger button on Windows.Fixed loading mappings for wrong platform
xinput: Calling set_ff_state() on devices that were never connected.
set_ff_state() on devices that were never connected.GamepadId was not reexported from private module.gilrs now uses gilrs-core crate as backend. Because of it, there are some breaking changes to API.
GamepadIdGilrs::gamepad(id). This function is replacement
for Index operator and can return disconnected gamepads.Gamepad::uuid -> Uuid to Gamepad::uuid -> [u8; 16]gilrs now uses gilrs-core crate as backend. Because of it,
there are some breaking changes to API.&Gamepad now return Gamepad<'_> proxy object.Gilrs::get(id) to Gilrs::connected_gamepad(id).Gamepad::set_mapping{,_strict}() to Gilrs. These functions now
also take gamepad id as additional argument.usize for gamepad ID, GamepadId is now used.&mut Gamepad.Gilrs no longer implements Index and IndexMut operators. Use
Gilrs::gamepad(id) instead.Gamepad::status() and Status enum. Gamepad::is_connected() is
now sufficient to determine status of gamepad.Nothing published for this version
Nothing published for this version
Added ev::Code::into_u32() ( @rukai ). ev::{Button, Axis, AxisOrBtn} now implements Hash ( @sheath ). Changed The URL of repository has changed to htt
Repeat filter.Axis::DPadY was inverted on Linux.ev::Code::into_u32() (@rukai).ev::{Button, Axis, AxisOrBtn} now implements Hash (@sheath).Repeat filter.Axis::DPadY was inverted on Linux.Added Support for parsing SLD 2.0.6 mappings. ButtonChanged event. It contains value in range [0.0, 1.0]. GilrsBuilder::set_axis_to_btn() . It allow t
ButtonChanged event. It contains value in range [0.0, 1.0].GilrsBuilder::set_axis_to_btn(). It allow to customize on which values
ButtonePressed and ButtonReleased are emitted.GilrsBuilder::set_update_state which control whether gamepad state should
be updated automatically.ButtonState::value().Mapping::insert_{btn,axis}().Gampead::os_name() and Gamepad::map_name(). (@rukai)GilrsBuilder::add_env_mappings() and GilrsBuilder::add_included_mappings(),
allow to configure whether to load mappings from SDL_GAMECONTROLLERCONFIG env
and bundled mappings. (@rukai)Gilrs::insert_event().Axis::second_axis() – returns the other axis of gamepad element. For example,
this function will return LeftStickX for LeftStickY.Mapping no longer implements Index and IndexMut operators. Use
Mapping::insert_{btn,axis}() methods to add new mappings.Axis::{LeftTrigger, LeftTrigger2, RightTrigger, RightTrigger2}. All events
with these are now button events. ButtonChanged event contains value.Gilrs::gamepad() and Gilrs::gamepad_mut() – use Index operator instead.Filter::filter to Filter::filter_ev because RFC 2124 added
filter method to Option (our Filter is implemented for Option<Event>).Gamepad::deadzone() now returns Option<f32> instead of f32.NativeEvCode is replaced by ev::Code, a strongly typed struct that also
distinguish between axes and buttons.State now tracks floating-point value of buttons.State::value() can now be used to also examine value of buttons.GilrsBuilder::set_update_state.Gilrs::new() and GilrsBuilder::build() now returns Result. Dummy context
can still be used, but only if result of failure is unsupported platform.Gilrs::connected_gamepad() and Gilrs::connected_gamepad_mut() to
get() and get_mut().Filter and FilterFn now borrows Gilrs mutably.c_char = u8.ButtonChanged event. It contains value in range [0.0, 1.0].GilrsBuilder::set_axis_to_btn(). It allow to customize on which values
ButtonePressed and ButtonReleased are emitted.GilrsBuilder::set_update_state which control whether gamepad state should
be updated automatically.ButtonState::value().Mapping::insert_{btn,axis}().Gampead::os_name() and Gamepad::map_name(). (@rukai)GilrsBuilder::add_env_mappings()
and GilrsBuilder::add_included_mappings(),
allow to configure whether to load mappings from SDL_GAMECONTROLLERCONFIG
env
and bundled mappings. (@rukai)Gilrs::insert_event().Axis::second_axis() – returns the other axis of gamepad element. For
example,
this function will return LeftStickX for LeftStickY.Mapping no longer implements Index and IndexMut operators. Use
Mapping::insert_{btn,axis}() methods to add new mappings.Axis::{LeftTrigger, LeftTrigger2, RightTrigger, RightTrigger2}. All events
with these are now button events. ButtonChanged event contains value.Gilrs::gamepad() and Gilrs::gamepad_mut() – use Index operator instead.Filter::filter to Filter::filter_ev because RFC 2124 added
filter method to Option (our Filter is implemented
for Option<Event>).Gamepad::deadzone() now returns Option<f32> instead of f32.NativeEvCode is replaced by ev::Code, a strongly typed struct that also
distinguish between axes and buttons.State now tracks floating-point value of buttons.State::value() can now be used to also examine value of buttons.GilrsBuilder::set_update_state.Gilrs::new() and GilrsBuilder::build() now returns Result. Dummy
context
can still be used, but only if result of failure is unsupported platform.Gilrs::connected_gamepad() and Gilrs::connected_gamepad_mut() to
get() and get_mut().Filter and FilterFn now borrows Gilrs mutably.c_char = u8.Fixed linux: Fixed compilation on platforms with c_char = u8 (for example ARM).
Fixed Fixed compilation errors on recent nightly introduced by addition of filter method to Option . If you want to use filters in your code on nightl
Added Mapping::remove_button() and Mapping::remove_axis() . GilrsBuilder for customizing how Gilrs is created. Event filters. See ev::filter module fo
Mapping::remove_button() and Mapping::remove_axis().GilrsBuilder for customizing how Gilrs is created.ev::filter module for more info.Gilrs::next_event() - use it with while let loop in your event loop.
This allow to avoid borrow checker problems that EventIterator caused.Dropped. Used by filters to indicate that you should ignore
this event.ButtonRepeated. Can be emitted by Repeat filter.Axis::{DPadX, DPadY}Gamepad::{button_name, axis_name, button_code, axis_code} functions for
accessing mapping data.Gamepad::axis_data, button_data – part of new extended gamepad state.Gamepad::id() – returns gamepad ID.Gilrs::update, inc, counter, reset_counter – part of new extended
gamepad state.Gilrs::with_mappings() – use GilrsBuilder.Gilrs::poll_events() and EventIterator – use Gilrs::next_event()
instead.is_pressed() and value() methods is
same, but check out documentation for new features.Gilrs::update(Event).
This change was necessary because filters can change events.Event is now a struct and contains common information like id of gamepad
and timestamp (new). Old enum was renamed to EventType and can be accessed
from Event.event public field.ff::Error::EffectNotSupported to ff::Error::NotSupported.Button::Unknown and Axis::Unknown have now value of 0.Gamepad::set_mapping() (and _strict variant) now returns error when
creating mapping with Button::Unknown or Axis::Unknown. Additionally
_strict version does not allow Button::{C, Z} and Axis::{LeftZ, RightZ}.NativEvCode
unreachable!() when creating mapping with Button::{C, Z, Unknown} or Axis::{LeftZ, RightZ}.Mapping::remove_button() and Mapping::remove_axis().GilrsBuilder for customizing how Gilrs is created.ev::filter module for more info.Gilrs::next_event() - use it with while let loop in your event loop.
This allow to avoid borrow checker problems that EventIterator caused.Dropped. Used by filters to indicate that you should ignore
this event.ButtonRepeated. Can be emitted by Repeat filter.Axis::{DPadX, DPadY}Gamepad::{button_name, axis_name, button_code, axis_code} functions for
accessing mapping data.Gamepad::axis_data, button_data – part of new extended gamepad state.Gamepad::id() – returns gamepad ID.Gilrs::update, inc, counter, reset_counter – part of new extended
gamepad state.Gilrs::with_mappings() – use GilrsBuilder.Gilrs::poll_events() and EventIterator – use Gilrs::next_event()
instead.is_pressed() and value() methods is
same, but check out documentation for new features.Gilrs::update(Event).
This change was necessary because filters can change events.Event is now a struct and contains common information like id of gamepad
and timestamp (new). Old enum was renamed to EventType and can be accessed
from Event.event public field.ff::Error::EffectNotSupported to ff::Error::NotSupported.Button::Unknown and Axis::Unknown have now value of 0.Gamepad::set_mapping() (and _strict variant) now returns error when
creating mapping with Button::Unknown or Axis::Unknown. Additionally
_strict version does not allow Button::{C, Z} and Axis::{LeftZ, RightZ}.NativEvCodeunreachable!() when creating mapping with Button::{C, Z, Unknown} or Axis::{LeftZ, RightZ}.v0.4.4 — 2017-06-16 Changed Gilrs no longer uses ioctl crate on Linux. Because ioctl was deprecated and all versions yanked, it was causing problems f…
ioctl crate on Linux. Because ioctl was deprecated
and all versions yanked, it was causing problems for new builds that didn't
have ioctl crate listed in Cargo.lock.v0.4.3 — 2017-03-12 Added You can now iterate over mutable references to connected gamepads using Gilrs::gamepads_mut() . Fixed Fixed unreachable!() p
Gilrs::gamepads_mut().unreachable!() panic on 32bit Linuxf32 when using XInputv0.4.2 - 2017-01-15 Changed Updated SDL_GameControllerDB to latest revision. Changes in axes values that are less than 1% are now ignored. Fixed Fixed
AxisChanged event now have correctly applied
deadzones.AxisChanged event now have correctly applied
deadzones.v0.4.1 - 2016-12-12 Fixed Type inference error introduced by generic index in <[T]>::get
<[T]>::getv0.4.0 - 2016-12-11 Added Gamepad::mappings_source(&self) which can be used to filter gamepads which not provide unified controller layout MappingsSou
Gamepad::mappings_source(&self) which can be used to filter gamepads which
not provide unified controller layoutMappingsSource enumGamepad::set_mapping(…)
Gilrs::with_mappings(&str) to create Gilrs with additional gamepad mappingsUnknown
(previously all unknown events have been ignored)mappings_source() to
filter unwanted gamepads){Gamepad,GamepadState}::is_btn_pressed(Button) to
is_pressed(Button)
{Gamepad,GamepadState}::axis_val(Axis) to value(Axis)
Gilrs should no longer panic if there are some unexpected problems with
UdevGamepad::mappings_source(&self) which can be used to filter gamepads which
not provide unified controller layoutMappingsSource enumGamepad::set_mapping(…)Gilrs::with_mappings(&str) to create Gilrs with additional gamepad mappingsUnknown
(previously all unknown events have been ignored)mappings_source() to
filter unwanted gamepads){Gamepad,GamepadState}::is_btn_pressed(Button) to
is_pressed(Button){Gamepad,GamepadState}::axis_val(Axis) to value(Axis)Gilrs should no longer panic if there are some unexpected problems with
UdevFixed compilation error on non-x86_64 Linux
ff::Direction::from_radians(f32) and ff::Direction::from_vector([f32; 2])
Gamepad::power_info(&self)ff::Direction::from_radians(f32) and ff::Direction::from_vector([f32; 2])Gilrs::gamepads(&self) which returns iterator over all connected gamepadsGamepadState now implements is_btn_pressed(Button) and axis_val(Axis)Gilrs now implements Indexand IndexMutButton::Unknow to Button::UnknownGamepad::name(&self) now returns &str instead of &StringEffect::play(&self, u16) now returns Result<(), Error>ff::Direction no longer implements From<f32>Gilrs::pool_events() to Gilrs::poll_events()Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →