undocumented_unsafe_blocks joins unsafe_op_in_unsafe_fn in
[workspace.lints], and the ~100 scattered per-file #![deny(...)] attributes
(85 files) are deleted — a new crate, or a new module in an old one, is now
covered on creation rather than on remembering. The per-file form is how
pf-vkhdr-layer, wdk-probe and half of pf-clipboard stayed uncovered.
There are THREE workspaces, so the claim is made three times: the main
Cargo.toml, packaging/windows/drivers (workspace table + [lints]
workspace = true in all seven members), and packaging/windows/pf-vkhdr-layer
(its [lints] table, previous commit). pf-update now opts into workspace
lints; the two vendored member snapshots (cros-codecs, usbip-sim) stay out
deliberately and now both say so.
Newly-covered fallout was two link-sanity tests (pyrowave-sys, libvpl-sys)
— proofs written. Stale prose that claimed the workspace held
unsafe_op_in_unsafe_fn at "warn" (it has been deny) or pointed at the
deleted attributes is corrected.
nvenc_core.rs is carved OUT of the unsafe_op_in_unsafe_fn fence: its
exemption rationale ("raw entry-table calls almost line for line") was
false — the file makes zero FFI calls. Its unsafe surface is C-union writes
whose soundness hangs on which codec arm is active, and its own 4:4:4 note
records the shipped bug (hevcConfig bytes stamped onto an AV1 config) that
per-operation blocks make visible. It now runs the strictest discipline in
the crate: clippy::multiple_unsafe_ops_per_block at deny, one union access
per block, each naming its codec guard.
Verified here: cargo fmt clean in all three workspaces; native clippy
-D warnings clean for everything that compiles on macOS (the three
pre-existing mac-native failures — pf-client-core wol.rs, pf-encode
dead-code/closure-call, probe mic_burst — reproduce on the clean tree).
Linux/Windows legs ride the .25/.133 gate.
60 lines
2.5 KiB
TOML
60 lines
2.5 KiB
TOML
# Unified in-tree workspace for punktfunk's all-Rust UMDF drivers, on microsoft/windows-drivers-rs
|
|
# (crates.io wdk/wdk-sys/wdk-build — NOT the dev-box ../../crates/wdk* path-deps). Part of the
|
|
# Windows-host rewrite (design/windows-host-rewrite.md, M1). pf-vdisplay + the gamepad drivers move here.
|
|
#
|
|
# Separate from the main cargo workspace (own [workspace] root) because driver crates are cdylibs built
|
|
# with the WDK toolchain (cargo-wdk / wdk-build) on Windows only. Path-deps the shared ABI crate
|
|
# crates/pf-driver-proto from the main tree.
|
|
[workspace]
|
|
resolver = "2"
|
|
members = ["wdk-probe", "wdk-iddcx", "pf-umdf-util", "pf-vdisplay", "pf-gamepad", "pf-xusb", "pf-mouse"]
|
|
|
|
[workspace.package]
|
|
edition = "2024"
|
|
version = "0.0.1"
|
|
license = "MIT OR Apache-2.0"
|
|
publish = false
|
|
|
|
# The same unsafe discipline as the main workspace (see its Cargo.toml for the full rationale).
|
|
# Restated here because THIS IS A SEPARATE WORKSPACE: the main tree's [workspace.lints] does not
|
|
# reach these crates, so any "workspace-wide" lint claim has to be made here too or it is false
|
|
# for the driver surface. Every member opts in with `[lints] workspace = true`.
|
|
# (`unsafe_op_in_unsafe_fn` is already the edition-2024 default; deny pins it explicitly.)
|
|
[workspace.lints.rust]
|
|
unsafe_op_in_unsafe_fn = "deny"
|
|
|
|
[workspace.lints.clippy]
|
|
undocumented_unsafe_blocks = "deny"
|
|
|
|
[workspace.dependencies]
|
|
wdk = "0.4.1"
|
|
wdk-sys = "0.5.1"
|
|
wdk-build = "0.5.1"
|
|
wdk-iddcx = { path = "wdk-iddcx" }
|
|
pf-umdf-util = { path = "pf-umdf-util" }
|
|
pf-driver-proto = { path = "../../../crates/pf-driver-proto" }
|
|
|
|
# Vendored windows-drivers-rs 0.5.1 (the published, self-contained crates) + an added `iddcx`
|
|
# ApiSubset (M1 — bindgens iddcx/1.10/IddCx.h reusing wdk_default for WDF type-identity). Redirect ALL
|
|
# wdk-sys/wdk-build refs (incl. wdk 0.4.1's transitive deps) to the patched copies so there is exactly
|
|
# one (iddcx-capable) wdk-sys in the graph. Pinned; do not chase upstream.
|
|
[patch.crates-io]
|
|
wdk-build = { path = "vendor/wdk-build" }
|
|
wdk-sys = { path = "vendor/wdk-sys" }
|
|
|
|
# wdk-sys's build script reads the WDK driver-model from the WORKSPACE metadata (a workspace build can't
|
|
# know which member it's building for). All our drivers are UMDF 2.x (incl. pf-vdisplay's IddCx), so set
|
|
# it once here; a member needing a different model would get its own [package.metadata.wdk.driver-model].
|
|
[workspace.metadata.wdk.driver-model]
|
|
driver-type = "UMDF"
|
|
umdf-version-major = 2
|
|
target-umdf-version-minor = 31
|
|
|
|
[profile.dev]
|
|
panic = "abort"
|
|
lto = true
|
|
|
|
[profile.release]
|
|
panic = "abort"
|
|
lto = true
|