Pipeline status Coverage report Crates.io Documentation License

joydev

A Rust wrapper library for joydev devices

Usage

Add this to your Cargo.tml:

toml [dependencies] joydev = "^0.3.0"

and this to your crate root:

rust extern crate joydev;

to get started open a device:

```rust use joydev::Device;

fn main() { // You should probably check what devices are available // by reading /dev/input directory or using udev. if let Ok(device) = Device::open("/dev/input/js0") { // Get an event and print it. println!("{:?}", device.get_event()); } } ```

or run the example:

nix cargo run --example=device