libudev
Rust wrapper for libudev
0.3.0
11M downloads/mo
#2964 most downloaded on crates.io
dcuddeback/libudev-rs
What this package is like to depend on
Last release 6 years ago
no release in 18 months
Ships unpredictably
gaps range from 9 days to 4.8 years
Nearly every release is documented
notes for 7 of 7 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
7 releases · first in 2015
0 releases in the last 12 months
see the full history below
Release timeline
7 releases · Apr 2015 to Jan 2021Releases
latest 7-
0.3.017 Jan 2021Release notes
Open source →This release changes the resource management strategy. Tracking lifetimes of dependent resources makes for a less-ergonomic API. That has been replaced with reference-counting. There are no known backwards-compatibility issues with this change, so existing code should not have to be updated for compatibility with reference-counting.
There are, however, some breaking changes to the API that are unrelated to the changes in resource management:
-
Context::device_from_syspath()has been moved toDevice::from_syspath(). Upgrading involves a search-and-replace. Anywhere you have the following code:context.device_from_syspath(path);
should be replaced with:
Device::from_syspath(&context, path);
-
Several methods on
Devicechanged their return type to account for the possibility of the C library returningNULLpointers:Device::syspath()returnsOption<&Path>instead of&Path.Device::devpath()returnsOption<&OsStr>instead of&OsStr.Device::subsystem()returnsOption<&OsStr>instead of&OsStr.Device::sysname()returnsOption<&OsStr>instead of&OsStr.
Client code will have to decide how to handle a
Nonereturn value.
Added
- Implemented
CloneforContext.
Fixed
- Fixed several issues related to lifetimes.
- Handled possible
NULLreturn fromudev_device_get_syspath(),udev_device_get_devpath(),udev_device_get_subsystem(), andudev_device_get_sysname(). - Reduced memory footprint of several types to a single pointer.
- Reduced unnecessary memory allocations when iterating devices and setting up a monitor.
Changed
- Replaced explicit lifetimes with reference counting.
- Moved
Context::device_from_syspath()toDevice::from_syspath(). - Changed return type of
Device::syspath(),Device::devpath(),Device::subsystem(), and
Device::sysname()toOption<...>.
Release notes
Open source →This release changes the resource management strategy. Tracking lifetimes of dependent resources makes for a less-ergonomic API. That has been replaced with reference-counting. There are no known backwards-compatibility issues with this change, so existing code should not have to be updated for compatibility with reference-counting.
There are, however, some breaking changes to the API that are unrelated to the changes in resource management:
-
Context::device_from_syspath()has been moved toDevice::from_syspath(). Upgrading involves a search-and-replace. Anywhere you have the following code:context.device_from_syspath(path);should be replaced with:
Device::from_syspath(&context, path); -
Several methods on
Devicechanged their return type to account for the possibility of the C library returningNULLpointers:Device::syspath()returnsOption<&Path>instead of&Path.Device::devpath()returnsOption<&OsStr>instead of&OsStr.Device::subsystem()returnsOption<&OsStr>instead of&OsStr.Device::sysname()returnsOption<&OsStr>instead of&OsStr.
Client code will have to decide how to handle a
Nonereturn value.
Added
- Implemented
CloneforContext.
Fixed
- Fixed several issues related to lifetimes.
- Handled possible
NULLreturn fromudev_device_get_syspath(),udev_device_get_devpath(),udev_device_get_subsystem(), andudev_device_get_sysname(). - Reduced memory footprint of several types to a single pointer.
- Reduced unnecessary memory allocations when iterating devices and setting up a monitor.
Changed
- Replaced explicit lifetimes with reference counting.
- Moved
Context::device_from_syspath()toDevice::from_syspath(). - Changed return type of
Device::syspath(),Device::devpath(),Device::subsystem(), andDevice::sysname()toOption<...>.
-
-
0.2.016 Apr 2016Release notes
Open source →Added
- Added
Device::parent().
Changed
- Replaced
c_interror code withstd::io::ErrorKind. - Minimum supported version of Rust is now 1.4.0.
- Added
-
0.1.205 Nov 2015 -
0.1.103 Oct 2015 -
0.1.008 May 2015Release notes
Open source →Changed
- Bumped
libudev-sysdependency to v0.1.1, which allowslibudevto compile on 1.0.0-beta and presumably the imminent 1.0.0 release.
- Bumped
-
0.0.214 Apr 2015Release notes
Open source →Changed
- Removed dependencies on unstable features:
#![feature(libc)]: replaced withlibccrate#1[feature(std_misc)]: replacedAsOsStrwithAsRef<OsStr>#![feature(unsafe_destructor)]: stabilized
- Removed dependencies on unstable features:
-
0.0.105 Apr 2015