-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make non-verus-macro items external by default #771
Conversation
Could we make it a crate setting (or even, a module setting) instead of a command line flag? e.g., with a crate attribute
I feel like that would be more appropriate for multi-crate projects where you might be combining verified and unverified crates. |
I would also prefer making it a crate-level attribute, rather than a command line flag. This is also because I'd like to avoid having too many flags that significantly change the behavior of the tool (and that one needs to remember to include in the command line when working with a specific project). In fact, I think this is an argument for making |
I updated the PR to make external-by-default the default behavior, with a |
* Add --external-by-default flag * Make external-by-default opt-out rather than opt-in * Put cfg_attr around verus::internal in atomic.rs
Make non-verus-macro items external by default (#771)
When
--external-by-default
is passed on the command line, treat items outside theverus!
macro as#[verifier::external]
unless marked#[verifier::verify]
. This makes it easier to verify small amounts of code inside a larger unverified Rust crate. I would expect uses of#[verifier::verify]
to be rare for now; it would be more common to wrap the verified code insideverus!
.