95dcef3515
§6.2: add offset_of! asserts to SharedHeader/AddReply/control structs so a same-size field reorder is a compile error, not silent corruption (size+Pod alone miss it). §6.1: add XusbShm (64B) + PadShm (256B, incl device_type@140) layouts + Global\ name helpers + magics to the proto crate as the single source of truth, with offset asserts pinned to the shipped wire layout — kills the hand-duplicated literal-140 host/driver drift hazard. Enables bytemuck min_const_generics for the >32-byte reserved tails. Host + driver consumers switch in a follow-up. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
21 lines
1.2 KiB
TOML
21 lines
1.2 KiB
TOML
# Shared host<->driver binary contract for the punktfunk pf-vdisplay virtual display.
|
|
#
|
|
# Deliberately self-contained (no `*.workspace = true` inheritance, no Windows deps): this crate is a
|
|
# path dependency of BOTH the host workspace (crates/punktfunk-host) AND the out-of-workspace driver
|
|
# workspace (packaging/windows/drivers/), so it must resolve identically from either build graph. It is
|
|
# `no_std` (+ alloc) and platform-neutral; the GUID/LUID are plain integers each side converts to its
|
|
# own OS type. Defining every wire struct ONCE here — with `const` size/offset asserts + bytemuck
|
|
# round-trips — makes host<->driver ABI drift a COMPILE error instead of a silent frame/IOCTL corruption.
|
|
[package]
|
|
name = "pf-vdisplay-proto"
|
|
version = "0.0.1"
|
|
edition = "2021"
|
|
rust-version = "1.82"
|
|
license = "MIT OR Apache-2.0"
|
|
description = "Shared host<->driver binary contract for the punktfunk pf-vdisplay virtual display (control IOCTLs + IDD-push frame transport)."
|
|
publish = false
|
|
|
|
[dependencies]
|
|
# `min_const_generics`: Pod/Zeroable for `[u8; N]` of any N (the gamepad SHM reserved tails are >32).
|
|
bytemuck = { version = "1.19", features = ["derive", "min_const_generics"] }
|