3 unstable releases

0.2.0 May 11, 2024
0.1.1 Mar 2, 2023
0.1.0 Oct 2, 2022

#19 in #gadget

Download history 14/week @ 2024-06-21 9/week @ 2024-06-28 11/week @ 2024-07-05 11/week @ 2024-07-12 8/week @ 2024-07-19 19/week @ 2024-07-26 18/week @ 2024-08-02 21/week @ 2024-08-09 19/week @ 2024-08-16 14/week @ 2024-08-23 8/week @ 2024-08-30 5/week @ 2024-09-06 8/week @ 2024-09-13 39/week @ 2024-09-20 18/week @ 2024-09-27 6/week @ 2024-10-04

72 downloads per month
Used in 4 crates

MIT license

70KB
1.5K SLoC

HID Gadget Emulation in Rust

github crate docs MIT CI

Rust crate for interfacing with Linux HID Gadget devices (/dev/hidgX).

Since all functionality is dependent on Linux function calls, this crate only compiles for Linux systems.

Crates

  • hidg-core - core abstractions and low level interface (not for end users)
  • hidg - std interface which supports synchronous operation only
  • tokio-hidg - async interface for tokio async runtime
  • async-hidg - async interface for other async runtimes

Features

  • fromstr - implements core::str::FromStr implementation for some types
  • display - implements std::fmt::Display implementation for some types
  • phf - use phf in core::str::FromStr trait implementations
  • serde - enables serde support for some types
  • keyboard - enables keyboard class support
  • mouse - enables mouse class support

Dependencies

~0.7–1.3MB
~28K SLoC