Repository navigation
Refactoring vstd #2662
parno
started this conversation in
Language design
Replies: 1 comment
|
I like the idea. The main thing is to make sure that we won't run into coherence check problems. The same crate that defines the View trait will need to define the View trait for all the stdlib types. |
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.
At a recent Verus meeting, we discussed splitting
vstdinto three distinct crates, roughly along the following lines:corecrate that contains axiomatized proof types (e.g., the definition ofSeq,Map, etc.), the "introduction" of a bunch of basic Rust types (e.g.,OptionandResult) without specifications, and function definitions that Verus always expects to be present.core. It would include most ofseq_lib,map_lib,endian, etc.For usability purposes, it would still be possible to pull all of these in by declaring a single crate-level dependency, and a single
usedeclaration along the lines of today'suse vstd::prelude::*.We're hoping that this refactoring will:
vstdcurrently trusts vs. proves.vstd, if desired.vstd. This reduces the pressure forvstdto include the perfect spec for every project's use of every Rust library function, since projects can potentially roll their own (at the potential cost of fragmentation).All reactions