stick

Crates.iostick
lib.rsstick
version0.13.0
sourcesrc
created_at2018-01-21 05:32:54.403088
updated_at2023-03-04 00:49:17.299189
descriptionPlatform-agnostic asynchronous gamepad, joystick and flighstick library
homepagehttps://github.com/ardaku/stick/blob/stable/CHANGELOG.md
repositoryhttps://github.com/ardaku/stick
max_upload_size
id47629
size182,407
Interface (github:ardaku:interface)

documentation

https://docs.rs/stick

README

Stick

Platform-agnostic asynchronous gamepad, joystick and flightstick library

tests Docs crates.io

Stick supports getting controller input from a large variety of gamepads, joysticks, flightsticks, and other controllers. Stick also supports left/right rumble haptic effects.

Why Does Stick Exist?

The main reason is that I hadn't heard of gilrs when I started stick back in 2017 when gilrs was only a year old and had less than 500 all-time downloads. Now, I think there are many other reasons for stick to exist despite gilrs:

  • Executor-agnostic async/.await for gamepads, joysticks, etc (I recommend using the pasts crate for a simple single-threaded executor).
  • Low-level hotplugging support (you assign the gamepad ID's)
  • Meaningful Event Names (ActionA and ActionB instead of South and East)
  • Minimal dependencies
  • Dual licensed with the Boost license (permission to use without attribution in the binary's UI) - making it great for game development.
  • Not game-specific, doesn't depend on a "standard gamepad" model (which doesn't work due to the variety of controllers in existence) - therefore can also be used in robotics, control centers, advanced flight simulations, etc.
  • Support more types of gamepads/joysticks than gilrs, and (WIP) unified support across platforms.

Platform Support

  • Linux
  • Windows

Planned Platform Support

  • MacOS
  • BSD
  • Redox
  • Fuchsia
  • Android
  • iOS
  • Web Assembly
  • Nintendo Switch (And other game consoles)
  • Others

Table of Contents

API

API documentation can be found on docs.rs.

Features

You may enable the following features

  • sdb: Enabled by default, the Stick database controller remappings
  • gcdb: The SDL game controller database remappings

Upgrade

You can use the changelog to facilitate upgrading this crate as a dependency.

License

Licensed under any of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be licensed as described above, without any additional terms or conditions.

Help

If you want help using or contributing to this library, feel free to send me an email at aldaronlau@gmail.com.

Commit count: 257

cargo fmt