Warn when Kani runs under Rosetta 2 on Apple Silicon - #4789
Open
rbeauchamp wants to merge 1 commit into
Open
Conversation
kani --version --verbose now prints the host architecture and warns when the kani-driver process is translated (sysctl.proc_translated == 1): SAT solving under x86_64 translation carries a steep penalty and an x86_64 driver almost always ships x86_64 solver binaries. Warn-only: translation never blocks verification.
This was referenced Sep 8, 2026
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.
Description
kani --version --verbosenow prints the host architecture on macOS and warns when thekani-driverprocess itself is running translated under Rosetta 2 (sysctl.proc_translated == 1).Context
SAT solving under x86_64 translation carries a steep performance penalty on Apple Silicon, and an x86_64
kani-driveralmost always ships with x86_64 solver binaries (CBMC, Kissat) — so a translated driver is a reliable proxy for a fully translated toolchain. Today nothing tells the user; verification just runs 30–50% slower. The warning is detect-only and never blocks verification.Manual testing
kani --version --verboseon a native arm64 macOS host printsHost architecture: aarch64and no warning.rosetta_warning) and a thinsysctlprobe (is_process_translated), so the warning logic is unit-tested (cargo test -p kani-driver version: 11/11, including probe-never-panics and warning-content tests).false;--quiet's zero-output contract is untouched (the new output lives in the verbose-only path, and version printing is already caller-gated on--quiet).By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.