PackageTrack
Sign in Get early access

gilrs-core

Minimal event-based abstraction for working with gamepads

0.6.8 8.4M downloads/mo #3427 most downloaded on crates.io source

What this package is like to depend on

Last release 2 months ago

30 May 2026

Release timing varies

gaps range from 3 weeks to 6 months

Nearly every release is documented

notes for 36 of 38 stable releases

Nothing withdrawn

no release was ever pulled

8 years old

38 releases · first in 2018

4 releases in the last 12 months

see the full history below

Release timeline

38 releases · Oct 2018 to May 2026
2019 2020 2021 2022 2023 2024 2025 2026
Release Pre-release

Releases

latest 38
  1. 0.6.8 30 May 2026
    Release notes

    Changed

    • MSRV is now 1.84
    • windows: Propagate more errors to prevent panics on wine
    • linux: Update nix to 0.31
    Open source →
  2. 0.6.7 12 Jan 2026
    Release notes

    Changed

    • macOS: Switched to objc2-core-foundation and objc2-io-kit. (!163)

    Added

    • Added LinuxGamepadExt trait with devpath method. (!166, !167)

    Fixed

    • Linux: Handle NULL returned by udev_device_get_syspath. (!167)
    Open source →
  3. 0.6.6 28 Sep 2025
    Release notes

    Fixed

    • Fixed mappings on macOS.
    Open source →
  4. 0.6.5 21 Sep 2025
    Release notes

    Changed

    • Updated windows and nix crates
    Open source →
  5. 0.6.4 06 Apr 2025
    Release notes

    Changed

    • Updated windows crate
    Open source →
  6. 0.6.3 10 Mar 2025
    Release notes

    Fixed

    • Fixed panic on macOS when gamepad’s vec had unexpected length after failing to open a device

    Changed

    • Updated windows crate
    Open source →
  7. 0.6.2 09 Feb 2025
    Release notes

    Fixed

    • Fixed possible panic on Windows when NonRoamableId() could return error.

    Changed

    • Minimal supported Rust version is now 1.80.
    Open source →
  8. 0.6.1 13 Jan 2025
    Release notes

    Added

    • ev::Code::into_u32() (@rukai).
    • ev::{Button, Axis, AxisOrBtn} now implements Hash (@sheath).

    Changed

    Fixed

    • Various fixes to logging at incorrect log level. Thanks to @fuggles for locating and reporting these issues.
    • Possible panic in Repeat filter.
    • Axis::DPadY was inverted on Linux.
    Open source →
    Release notes

    Changed

    • Minimal supported Rust version is now 1.74
    • Updated windows crate
    Open source →
  9. 0.6.0 15 Sep 2024
    Release notes

    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 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.

    Removed

    • 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.

    Changed

    • Gilrs now require Rust 1.20.0 or newer.
    • Updated bundled mappings.
    • Renamed 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.
    • All axis events are now in range [-1.0, 1.0].
    • NativeEvCode is replaced by ev::Code, a strongly typed struct that also distinguish between axes and buttons.
    • You can now create mappings from any axis to any button.
    • State now tracks floating-point value of buttons.
    • State::value() can now be used to also examine value of buttons.
    • By default, gamepad state is updated automatically. If you customize event filters, you can disable this behaviour using 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.
    • Renamed Gilrs::connected_gamepad() and Gilrs::connected_gamepad_mut() to get() and get_mut().
    • Filter and FilterFn now borrows Gilrs mutably.
    • Windows: Gamepads are now named "Xbox Controller" instead of "XInput Controller". (@rukai)

    Fixed

    • Incorrect ranges for some axes.
    • Deadzone filter should no longer produce values outside of allowed range.
    • When calculating deadzone, the value of second axis is no longer ignored. This fixes situation, when sometimes axis would stay on value small to 0.0, when it should be 0.0 instead.
    • Deadzone threshold was half of what it should be.
    • Linux: Fixed axis value normalization if neither minimal value is 0 nor midpoint is 0. (@scottpleb)
    • Linux: Ensure that axis values are clamped after normalization. (@scottpleb)
    • Linux: Compilation error on architectures with c_char = u8.
    Open source →
    Release notes

    Breaking changes

    • Mark Error enums, EventType and Event as non_exhaustive

    Changed

    • Minimal supported Rust version is now 1.73
    • Updated dependencies
    Open source →
  10. 0.5.15 25 Aug 2024
    Release notes

    Fixed

    • wasm: Fixed panic when browser assigned unexpected gamepad ID
    • windows: Fixed panic when receiving connected/disconnected events after instance of Gilrs was dropped.
    • windows: Don’t panic on Reading::update() returning error
    Open source →
  11. 0.5.14 25 Aug 2024

    Nothing published for this version

  12. 0.5.13 08 Jul 2024
    Release notes

    Changed

    • Updated windows crate
    Open source →
  13. 0.5.12 15 Jun 2024
    Release notes

    Fixed

    • Fixed building on FreeBSD and DragonFly by not using linux implementation

    Changed

    • Updated dependencies
    Open source →
  14. 0.5.11 06 Mar 2024
    Release notes

    Added

    • Added vendor_id() and product_id() to Gamepad.

    Changed

    • Updated windows crate to 0.54.
    Open source →
  15. 0.5.10 17 Dec 2023
    Release notes

    Changed

    • Updated windows crate to 0.52.
    Open source →
  16. 0.5.9 13 Nov 2023
    Release notes

    Fixed

    • Disabled unnecessary default features for inotify.
    Open source →
  17. 0.5.8 11 Nov 2023
    Release notes

    Added

    • Flatpak is now supported by using inotify instead of udev. (!104)

    Changed

    • All thread spawned by gilrs are now named. (!102)
    • MSRV is now 1.65.

    Fixed

    • Linux: Fixed delay in Gilrs::new by limiting udev scan to the input subsystem. (!101)

    Fixed

    Open source →
  18. 0.5.7 22 Aug 2023
    Release notes

    Fixed

    • windows: Join wgi thread on Gilrs's drop
    • wasm: Fix trigger2 only sending binary values

    Changed

    • Update windows to 0.51
    Open source →
  19. 0.5.6 24 Jun 2023
    Release notes

    Fixed

    • Linux: fixed panic when calling get_power_info on disconnected gamepad.
    Open source →
  20. 0.5.5 23 Apr 2023
    Release notes

    Added

    • Gilrs::next_event_blocking()
    Open source →
  21. 0.5.4 03 Apr 2023
    Release notes

    Changed

    • Updated io-kit-sys, windows and nix
    Open source →
  22. 0.5.3 29 Mar 2023
    Release notes

    Changed

    • Updated windows to 0.44

    Fixed

    • web: Fixed handling of disconnected gamepads
    Open source →
  23. 0.5.2 16 Dec 2022
    Release notes

    Fixed

    • linux: Fixed compilation on platforms with c_char = u8 (for example ARM).
    Open source →
    Release notes

    Changed

    • Gilrs is now Send on Linux.

    Fixed

    • Crash when app is launched through steam on Windows (see https://github.com/microsoft/windows-rs/issues/2252 for details).
    Open source →
  24. 0.5.1 13 Nov 2022
    Release notes

    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 nightly, use universal function call syntax – Filter::filter(&ev, &filter, &gilrs) or 0.6 branch (at the moment unreleased).
    Open source →
    Release notes

    Fixed

    • macOS: Fixed that hat axes were sometimes added before other axes breaking SDL mappings.
    • web: Fixed swapped north and west buttons for gamepads with "standard" mapping
    Open source →
  25. 0.5.0 06 Nov 2022
    Release notes

    Added

    • Mapping::remove_button() and Mapping::remove_axis().
    • GilrsBuilder for customizing how Gilrs is created.
    • Event filters. See 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.
    • New event – Dropped. Used by filters to indicate that you should ignore this event.
    • New 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.

    Removed

    • Gilrs::with_mappings() – use GilrsBuilder.
    • Gilrs::poll_events() and EventIterator – use Gilrs::next_event() instead.

    Changed

    • Minimal rust version is now 1.19
    • New gamepad state. Now can store state for any button or axis (previously was only useful for named buttons and axes). Additionally it now also know when last event happened. Basic usage with is_pressed() and value() methods is same, but check out documentation for new features.
    • Gamepad state now must be explicitly updated with 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.
    • New force feedback module, including support for Windows. There are to many changes to list them all here, so pleas check documentation and examples.
    • Renamed 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}.
    • xinput: New values for NativEvCode

    Fixed

    • Panic on unreachable!() when creating mapping with Button::{C, Z, Unknown} or Axis::{LeftZ, RightZ}.
    Open source →
    Release notes

    Changed

    • 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-core = {version = "0.5.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.

    • Minimal supported rust version is now 1.64.

    Fixed

    • Gamepad::axes() on macos now also returns "hat" axes. This should fix dpad on single Switch Joy-Con.
    Open source →
  26. 0.4.1 29 May 2022
    Release notes

    v0.4.1 - 2016-12-12

    Fixed

    • Type inference error introduced by generic index in <[T]>::get
    Open source →
    Release notes

    Changed

    • Updated io-kit-sys to 0.2 and core-foundation to 0.9 (@jtakakura).
    • Reduced numer of enabled features for nix crate (@rtzoeller).
    Open source →
  27. 0.4.0 22 May 2022
    Release notes

    v0.4.0 - 2016-12-11

    Added

    • Gamepad::mappings_source(&self) which can be used to filter gamepads which not provide unified controller layout
    • MappingsSource enum
    • You can now set custom mapping for gamepad with Gamepad::set_mapping(…)
    • Gilrs::with_mappings(&str) to create Gilrs with additional gamepad mappings

    Changed

    • Button and axis events now also have native event codes
    • On Linux, if button or axis is not known, is now reported as Unknown (previously all unknown events have been ignored)
    • More devices are now treated as gamepads on Linux (use mappings_source() to filter unwanted gamepads)
    • Renamed {Gamepad,GamepadState}::is_btn_pressed(Button) to is_pressed(Button)
    • Renamed {Gamepad,GamepadState}::axis_val(Axis) to value(Axis)

    Fixed

    • Integer overflow if button with keyboard code was pressed on Linux
    • Gilrs should no longer panic if there are some unexpected problems with Udev
    • Fixed normalization of axes values on Linux
    Open source →
    Release notes

    Changed

    • wasm: web-sys/wasm-bindgen is now used by default, dependency on stdweb and wasm-bindgen feature are removed.
    • Minimal supported rust version is now 1.56.
    • Updated uuid and nix to current version.

    Fixed

    • wasm: next_event() no longer panic if getGamepads() is not available.
    Open source →
  28. 0.3.2 30 Dec 2021
    Release notes

    Changed

    • Updated dependencies
    Open source →
  29. 0.3.1 30 Mar 2021
    Release notes

    Added

    • Add support for wasm-bindgen (@coolreader18)
    Open source →
  30. 0.3.0 09 Oct 2020
    Release notes

    Added

    • macos: dpad is supported as a set of dpad axes (gilrs filters dpad axes to dpad buttons) (@cleancut).

    Changed

    • Minimal supported version is now 1.40
    Open source →
  31. 0.2.6 11 May 2020
    Release notes

    Fixed compilation on musl.

    Open source →
  32. 0.2.5 30 Nov 2019
    Release notes

    Updated dependencies.

    Open source →
  33. 0.2.4 05 Sep 2019
    Release notes

    Fixed

    • Fixed compilation on platforms with dummy impl
    Open source →
  34. 0.2.3 06 Aug 2019
    Release notes

    Fixed

    • xinput: Removed unneeded logging
    • macos: IS_Y_AXIS_REVERSED is now correctly set to true
    • macos: Fixed UUID calculation
    Open source →
  35. 0.2.2 06 Apr 2019
    Release notes

    Changed

    • Windows: XInput is now dynamically loaded using rusty-xinput

    Fixed

    • xinput: incorrect is_connected() after hotplugging
    • wasm: Incorrect gamepad IDs in Disconnected event (@ryanisaacg)
    Open source →
  36. 0.2.1 25 Feb 2019
    Release notes

    Fixed

    • Compilation error on macOS
    Open source →
  37. 0.2.0 21 Feb 2019
    Release notes

    Added

    • Initial support for macOS (@jtakakura). There are still some functionality missing, check related issues in #58.
    • Wasm support, using stdweb (@ryanisaacg).

    Changed

    • AxisInfo::deadzone is now a Option.
    • Minimal supported version is now 1.31.1. The crate can still be build with older rustc, but it may change during next patch release.

    Removed

    • AxisInfo::deadzone() function.

    Fixed

    • xinput: Incorrect gamepad ID when more than one gamepad is connected ( @DTibbs).
    Open source →
  38. 0.1.0 30 Oct 2018

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive