docs(fast_io): audit kqueue cross-platform gates (XPL-2)#4775
Merged
Conversation
Documents the cfg-gating audit for the kqueue surface in fast_io. All eight items audited are already correctly gated (0 CI-fatal, 0 warning, 8 clean): the module mount switch is exhaustive, the stub avoids libc on non-unix targets, RawFd is aliased per target, and the macOS-only unsafe Send impl is scoped to the macOS module. No code changes required.
fdc6af1 to
1e106de
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fast_io(crates/fast_io/src/kqueue/mod.rs,crates/fast_io/src/kqueue_stub.rs, and thelib.rsmount + re-export site) against the project Cross-Platform conventions.Findings (clean)
lib.rsmount switch is symmetric and exhaustive (target_os = "macos"vsnot(target_os = "macos")).#![cfg(not(target_os = "macos"))]+#![allow(dead_code)]are correct.RawFdalias compiles on every target without referencinglibc(which iscfg(unix)-only inCargo.toml).KEventFiltervariants are not platform-dependent; no "gate the variant, not the impl" hazard.KEventstruct fields arepub; no platform-dependent dead-field hazard.unsafe impl Send for KqueueLoop {}lives in the macOS-only module, never compiled on Windows or musl.#[cfg(unix)]tests inside ungated modules).lib.rs:282uses backtick-only prose, dodging the rustdoc re-export link breakage.See
docs/design/xpl-2-kqueue-audit.mdfor the full per-item walk plus methodology.Test plan