-
Notifications
You must be signed in to change notification settings - Fork 49
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
How to compile modules using Creusot contracts? #1000
Comments
Unfortunately, that's the best way I know of doing things, I suppose the alternative would be for creusot to not enable these features and instead just require all client projects to unconditionally enable them? I'm open to suggestions on this. |
Yes, I think creusot should let users enable those features unconditionally. #![feature(stmt_expr_attributes,proc_macro_hygiene)] |
I'd like a macro to generate these automatically each time we are using Creusot. But here it is said that this is impossible: https://users.rust-lang.org/t/how-to-generate-top-level-macro-calls-with-a-proc-macro/51142 Sad :'( |
The real solution is to just work to stablize these features :P |
I'm not confident that we will never use another unstable feature in the future. |
In our macros? That seems easier to guarantee, in the creusot compiler / contracts sure. |
Following the Quickstart in the Creusot guide, I created a
src/lib.rs
file with some Creusot contracts.cargo creusot
succeeds, butcargo build
fails because some features are not enabled (whichcargo creusot
enabled implicitly to succeed). If I enable the features explicitly:Then
cargo creusot
complains because the features are enabled twice.One workaround is to enable the feature conditionally:
Am I missing something? Could Creusot not enable those features, or enable them only if they are not already enabled?
The text was updated successfully, but these errors were encountered: