Skip to content

Commit 10250ca

Browse files
committed
Use vstd only with --features verus
1 parent 6ede072 commit 10250ca

3 files changed

Lines changed: 16 additions & 3 deletions

File tree

.dir-locals.el

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
;;; Directory Local Variables -*- no-byte-compile: t; -*-
2+
;;; For more information see (info "(emacs) Directory Variables")
3+
4+
;; Regorus is a cargo-verus project (package.metadata.verus.verify = true), so
5+
;; verus-mode.el runs `cargo verus verify' rather than the raw `verus' binary.
6+
;; The cargo-verus path ignores `package.metadata.verus.ide.extra_args' and
7+
;; instead reads `verus-cargo-verus-arguments'. We set it here so that Verus is
8+
;; invoked with the `verus' Cargo feature enabled.
9+
;;
10+
;; Everything before `--' is passed to cargo-verus; everything after `--' is
11+
;; forwarded to the Verus binary. The `--' is required by verus-mode.el.
12+
((verus-mode . ((verus-cargo-verus-arguments . ("--features" "verus" "--")))))

.github/workflows/verus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ jobs:
7474
export PATH="$(cd "$(dirname "$cargo_verus_bin")" && pwd):$(cd "$(dirname "$verus_bin")" && pwd):$PATH"
7575
cargo verus --help
7676
cargo fetch --locked
77-
cargo verus verify --locked
77+
cargo verus verify --locked --features verus

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ doctest = false
2626

2727
[features]
2828
default = ["full-opa", "arc", "rvm"]
29+
verus = ["dep:vstd"]
2930

3031
arc = []
3132
ast = []
@@ -48,7 +49,7 @@ cache = ["dep:lru"]
4849
rvm = ["dep:postcard", "dep:indexmap"]
4950
semver = ["dep:semver"]
5051
allocator-memory-limits = ["std", "mimalloc", "mimalloc/allocator-memory-limits"]
51-
std = ["rand/std", "rand/std_rng", "serde_json/std", "indexmap?/std", "msvc_spectre_libs", "dep:parking_lot", "vstd/std" ]
52+
std = ["rand/std", "rand/std_rng", "serde_json/std", "indexmap?/std", "msvc_spectre_libs", "dep:parking_lot", "vstd?/std" ]
5253
time = ["dep:chrono", "dep:chrono-tz"]
5354
uuid = ["dep:uuid"]
5455
urlquery = ["dep:url"]
@@ -142,7 +143,7 @@ postcard = { version = "1.1.3", default-features = false, features = ["alloc"],
142143
# Verus-related dependencies.
143144
# vstd is always enabled. In no_std builds only the `alloc` feature is used; the
144145
# crate's `std` feature enables `vstd/std` (which matches vstd's default features).
145-
vstd = { version = "=0.0.0-2026-06-14-0213", default-features = false, features = ["alloc"] }
146+
vstd = { version = "=0.0.0-2026-06-14-0213", optional = true, default-features = false, features = ["alloc"] }
146147

147148
[dev-dependencies]
148149
anyhow = "1.0.102"

0 commit comments

Comments
 (0)