The Key type, US-QWERTY translate, and the edge-detecting boot-report parser lived in usb_kbd.rs, unreachable by cargo test (the firmware crate is pinned to the xtensa target). Move them to a dependency-free #![no_std] + #![forbid(unsafe_code)] crate so the one path that parses untrusted device bytes can be exercised on the host. 14 tests, including an ASCII-invariant sweep over all 256 usage IDs (pins the guarantee the editor's byte==char indexing relies on) and a never-panics fuzz over arbitrary-length/content reports.
11 lines
530 B
TOML
11 lines
530 B
TOML
[package]
|
|
name = "keymap"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
description = "Pure HID boot-keyboard decode: the Key event type, a US-QWERTY translate, and an edge-detecting Decoder. No esp/std deps, so it is host-testable and fuzzable off-device (see MEMORY_AUDIT.md)."
|
|
|
|
# Deliberately dependency-free and #![no_std] (except under test) so the decode
|
|
# path — the one place untrusted device bytes are parsed — can be exercised on
|
|
# the host without the ESP toolchain. The firmware crate depends on this by path.
|
|
[dependencies]
|