Speaker
Description
As HID support in Rust is being developed, a number of challenges are arising during the development process. Binding the C API that represents different HID structures will grow verbose as more HID logic is supported in Rust. Specialized HID device drivers will want to make use of APIs from other subsystems, such as input and DRM. Otherwise, such drivers tend to be isolated to HID report fixups. Ideally, Rust HID drivers would avoid doing pure HID device fixups since there are other mechanisms to perform such fixups besides a device driver.
Problems are surfacing even with the initial review for Rust HID support.
Examples
- Converting between kernel::hid::Group and the HID_GROUP_* define
equivalents
- Various manually implemented "getter" functions
- Defining HID report descriptor item attributes
This discussion is intended to find ways to improve such areas in the HID driver abstractions.