creusot
creusot copied to clipboard
Provide `cfg(creusot)`
It would be great if Creusot provided a cfg(creusot)
when compiling under cargo creusot
.
This would remove the need for the contracts
feature in creusot-contracts
, since the Creusot-specific code could switch to its rustc
-compatible mode on its own. It would also allow annotated rust code to be compiled both with normal rustc
and under Creusot without adding a contracts
feature to every crate that uses Creusot's annotations.
Does rustc
ignore unknown cfgs ? If so I'll see how we can add this
A quick test, looks like it does ignore unknown cfg
s: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=78fd0d6ac7925a9749ef1efbc94c2379
Great, I'll work on setting up Creusot to set this cfg then