Replies: 3 comments
-
|
Useful crates for building this out:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
Summarizing some discussion points from today's Verus meeting:
|
Beta Was this translation helpful? Give feedback.
0 replies
-
|
It looks like |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Here's a proposal that @Chris-Hawblitzel, @jaybosamiya-ms, and I discussed this afternoon. It's relevant to #1758.
To simplify installing and using Verus in production settings, here's a future we'd like to reach. It assumes that in the future, nearly everyone will be using
cargo verus, rather than invokingverusdirectly, just like most Rust developers usecargo build, notrustc.The plan centers on
cargo-verus, which will be hosted on crates.io and hence installable viacargo install cargo-verus, or it can be installed via a rustup-stylecurl ... | shcommand that we provide on the Verus site.We will extend
cargo-veruswith the functionality needed to acquire all of the functionality needed to run Verus. This includes:rustc-- We'll instrumentcargo-verusto confirm (viarustup) that the Verus-required Rust toolchain is installed (and if it's not, userustupto install it). In the unlikely event (b/c the user is already runningcargo-veruswithcargo) thatrustupis missing,cargo-veruswill politely suggest installing it.z3-- We'll instrumentcargo-verusto fetch the correct version of Z3 from Z3's GitHub release page and install it in a local cache (XDG).vstd-- This will be hosted oncrates.io. We'll want to ensure the crates can be built without Verus, i.e., by normal Rust compilation. From a quick scan, this seems largely feasible.verusbinary -- For now, the plan is forcargo-verusto fetch a release from the Verus GitHub releases. In the long run, it might be desirable to hostveruson crates.io as well. This might be feasible if we could move functionality that is currently invargointo abuild.rsfile instead.Versioning
The current proposal is that
cargo-veruswill be shipped with baked-in expected versions for each of the components above. Those are the versions it will expect to find in its cache and that it will fetch if it fails to find them. The current proposal is that every time acargo veruscommand is run, it will start by checking for expected versions and fetching any that are missing. Hence, there is no need for an explicitcargo verus installcommand.End users can move to the next working version set by running
cargo verus update, which would fetch the latest version ofcargo-verus, which may have new version expectations for one or more of the components above. End users who like their current state, can avoid unexpected component updates by sticking with a particular version ofcargo-verus.We could also support allowing end users to override these versions through environment variables, the way we currently do for Z3.
Crates using Verus for verfication purposes would continue to add
vstdand company to the[dependencies]section of theirCargo.tomlfile. Sincevstdet al. would be hosted on crates.io, users could specify version numbers instead of GitHub commits. If the developer published one of these crates, other non-Verus users could consume them by having cargo pull the necessaryvstddependencies from crates.io, just like any other dependency.If
cargo-verusruns on a crate that specifies in itsCargo.tomla version ofvstdthat differs from whatcargo-verusexpects, we will treat this as an error and suggest that the user either (a) update theirCargo.tomlfile, or (b) invoke a command-line flag to override the error.Deployment
We can reach the future above by following a rough plan of:
vstdet al. can build without Verus and push them to crates.io. Add this step to the CI that publishes Verus releases.cargo-veruswith functionality to find/install the components above. Once this is robust, make it the default behavior forcargo veruscommands.cargo-veruson crates.io, and add pushing updates ofcargo-verusto the CI release action.cargo-veruswith anupdatecommand for grabbing and installing the latest version of itself.Beta Was this translation helpful? Give feedback.
All reactions