Skip to content

Releases: SludgePhD/evdevil

v0.4.0

11 Jan 19:20

Choose a tag to compare

Breaking Changes

  • Removed FromRawFd implementation of UinputDevice.
    • Replaced with UinputDevice::from_owned_fd.
  • Removed Evdev::path (Evdev no longer stores the path it was opened from).
    • enumerate and enumerate_hotplug now yield (PathBuf, Evdev).
  • Removed all MAX and CNT constants from event code types.
  • Shortened lifetime of Effects returned by ForceFeedbackUpload to be tied to &self.
  • Remove all name methods from event code types.
    • Codes can instead be formatted via Debug or serialized with serde to obtain the name.
  • Removed all deprecated functionality.

Improvements

  • Added raw and from_raw functions to all types that wrap an integer and didn't already have them.
  • Added Switch::USB_INSERT.
  • Yield paths alongside devices when enumerating.
  • Document more clearly that new enumeration constants can be added in minor releases.
  • Document the evdev device lifecycle.
  • Add a few missing setters to force-feedback types.
  • EventReader::valid_slots now returns a real iterator type instead of impl Iterator.

Fixes

  • Limit number of reports processed by EventReader::update, to prevent getting stuck in there forever.
  • Made enumerate_hotplug() more robust, avoiding duplicate devices.
  • Don't wrap ENODEV in a custom error, making it easier to detect unplugged devices.

v0.3.5

08 Dec 13:48

Choose a tag to compare

Fixes

  • Fix a panic in examples/keymap.rs.
  • Fix all-zero Scancodes being printed as the empty string.

Improvements

  • Include the /dev/uinput path in the io::Error when opening the device fails.
  • Run the unit tests on Big Endian emulation in CI.

v0.3.4

07 Dec 04:25

Choose a tag to compare

Improvements

  • Add a few missing getters for force-feedback types.
  • Derive PartialOrd and Ord for EffectId.
  • Rename with_device_id to with_input_id (with deprecation).
  • Rename the ForceFeedbackEvent constructors to more evocative names (with deprecation).
  • Add #[inline] to more functions.

Fixes

  • Fix a bug where uninitialized bytes would be unsoundly reinterpreted as &[u8] when reading events from a UinputDevice.
  • Fix the PartialEq implementation of Periodic not comparing custom waveform data.

Other changes

  • Improved documentation a bit.
  • Deduplicated the internal implementation so that all event I/O happens in two root functions.
  • Audited the crate for Undefined Behavior.
  • Run CI on aarch64 Linux (GNU and musl).
  • Add the crate to the os::freebsd-apis category on crates.io.

v0.3.3

25 Jul 00:53

Choose a tag to compare

  • Try to fix the docs.rs render.

v0.3.2

25 Jul 00:37

Choose a tag to compare

  • Try to fix the docs.rs render.

v0.3.1

25 Jul 00:23

Choose a tag to compare

  • Try to fix the docs.rs render.

v0.3.0

25 Jul 00:07

Choose a tag to compare

Breaking Changes

  • HotplugMonitor no longer implements Iterator, but now implements IntoIterator.
  • HotplugMonitor now yields HotplugEvents instead of already-opened Evdevs.
    • Call HotplugEvent::open to open the device.
  • hotplug::enumerate has moved to enumerate_hotplug in the crate root.

New Features

Async

EventReader now allows reading events and reports via async.
This functionality requires enabling either the "tokio" or "async-io" Cargo features.

Note that a lot of evdev functionality cannot be made async and will always block.
Only reading events asynchronously via the EventReader is supported for now.

Other Changes

  • FreeBSD: sleep after connecting to devd to ensure no events go missing.
  • Mark some methods #[inline] for more efficient code generation.
  • Don't redundantly invoke fcntl if the non-blocking status is already what we want.
  • Implement AsFd and IntoRawFd for HotplugMonitor.
  • Include device path in error message if opening fails.
  • Add Report::len, returning the number of events in the Report.
  • Device enumeration iterators have been made real types instead of impl Iterator and moved to
    the enumerate module.

v0.2.3

15 Jul 20:06

Choose a tag to compare

  • Update from linux-ioctl to uoctl 1.0.

v0.2.2

15 Jul 14:27

Choose a tag to compare

  • Support FreeBSD, and test it in CI.
  • Improve error messages when some ioctls fail.

v0.2.1

12 Jul 22:05

Choose a tag to compare

Fixes

  • Fix InvalidInput error when creating EventReaders for most devices.