lib-input is the typed no_std client helper library for inputd.
- Rust 100%
|
|
||
|---|---|---|
| .github | ||
| src | ||
| .editorconfig | ||
| .gitignore | ||
| ARCHITECTURE.md | ||
| Cargo.toml | ||
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| LICENSE | ||
| README.md | ||
| ROADMAP.md | ||
| rustfmt.toml | ||
| SECURITY.md | ||
lib-input
lib-input is the typed no_std client helper library for inputd.
It provides a normalized key/pointer event model and strict IPC helper functions for appending events and reading routed events/status.
What it does
- Defines normalized event types:
InputEventV1::Key(KeyEventV1)InputEventV1::Pointer(PointerEventV1)
- Validates source role, endpoint slot, event-kind fields, and pointer button masks.
- Implements transport-callback helpers:
append_event(...)read_event(...)read_status(...)
- Enforces strict request/response identity and operation-id checks.
IPC contracts used
lib-input targets inputd v1 contracts in lib-ipc:
IPC_PHASE3_INPUTD_OP_APPEND_EVENT(0x5D0)IPC_PHASE3_INPUTD_OP_READ_EVENT(0x5D1)IPC_PHASE3_INPUTD_OP_READ_STATUS(0x5D2)
Body IDs and layout checks are delegated to lib-ipc parse/encode helpers.
Runtime model
- Allocation-free API surface.
- Caller-supplied transport callback.
- Deterministic error model (
Errorenum) with explicit categories for transport, framing, and payload validation failures.
Build and test
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-targets --all-features
Dependencies
lib-bootstraplib-ipc
No third-party crates are used.