Skip to content

Support Verus verification#759

Draft
jaylorch wants to merge 8 commits into
microsoft:mainfrom
jaylorch:verus
Draft

Support Verus verification#759
jaylorch wants to merge 8 commits into
microsoft:mainfrom
jaylorch:verus

Conversation

@jaylorch

@jaylorch jaylorch commented Jul 2, 2026

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds initial infrastructure to support running Verus verification in the regorus repository, including CI wiring and minimal source annotations needed for Verus-specific builds.

Changes:

  • Add a new verus GitHub Actions workflow that downloads Verus, installs the required Rust toolchain, and runs cargo verus verify.
  • Introduce Verus-related configuration/dependencies (vstd, package.metadata.verus, and verus_keep_ghost cfg allowance) and a small Verus annotation in src/number.rs.
  • Minor lint-related adjustments (#[allow(clippy::if_then_some_else_none)]) and lockfile refreshes across the workspace/bindings.

Reviewed changes

Copilot reviewed 5 out of 11 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/rvm/vm/comprehension.rs Adds targeted clippy allow to accommodate Verus/linting constraints.
src/number.rs Adds Verus-only imports/annotation and a clippy allow for Verus compatibility.
src/lib.rs Minor comment cleanup near crate-level lint configuration.
Cargo.toml Adds Verus metadata, vstd dependency, std-feature tweak, and cfg-lint allow for verus_keep_ghost.
Cargo.lock Updates dependency versions and introduces Verus-related crates in the lockfile.
bindings/wasm/Cargo.lock Lockfile updates to reflect workspace dependency changes (including Verus-related crates).
bindings/ruby/Cargo.lock Lockfile updates to reflect workspace dependency changes (including Verus-related crates).
bindings/python/Cargo.lock Lockfile updates to reflect workspace dependency changes (including Verus-related crates).
bindings/java/Cargo.lock Lockfile updates to reflect workspace dependency changes (including Verus-related crates).
bindings/ffi/Cargo.lock Lockfile updates to reflect workspace dependency changes (including Verus-related crates).
.github/workflows/verus.yml New CI workflow to install Verus + required toolchain and run verification.

Comment thread Cargo.toml
# Verus-related dependencies.
# vstd is always enabled. In no_std builds only the `alloc` feature is used; the
# crate's `std` feature enables `vstd/std` (which matches vstd's default features).
vstd = { git = "https://github.com/verus-lang/verus.git", default-features = false, features = ["alloc"] }
Comment thread Cargo.toml
Comment on lines 49 to 52
semver = ["dep:semver"]
allocator-memory-limits = ["std", "mimalloc", "mimalloc/allocator-memory-limits"]
std = ["rand/std", "rand/std_rng", "serde_json/std", "indexmap?/std", "msvc_spectre_libs", "dep:parking_lot" ]
std = ["rand/std", "rand/std_rng", "serde_json/std", "indexmap?/std", "msvc_spectre_libs", "dep:parking_lot", "vstd/std" ]
time = ["dep:chrono", "dep:chrono-tz"]
Comment on lines +62 to +64
# Put cargo-verus on PATH for the commands below.
export PATH="$(cd "$(dirname "$verus_bin")" && pwd):$PATH"
cargo verus --help
Comment on lines +32 to +33
asset_url="$(curl -fsSL https://api.github.com/repos/verus-lang/verus/releases/latest | grep '"browser_download_url":' | cut -d '"' -f 4 | grep -E 'x86-linux\.zip$' | head -n1)"
test -n "$asset_url"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants