HID Gadget Emulation in Rust
Rust crate for interfacing with Linux HID Gadget devices (/dev/hidgX). This crate supports async-std async runtime.
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 adepts
- async-std-hidg - async interface for async-std adepts
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
Usage examples
Keyboard input simulation:
use ;
async
Mouse input simulation:
use ;
async