creusot icon indicating copy to clipboard operation
creusot copied to clipboard

Provide `cfg(creusot)`

Open LevitatingLion opened this issue 1 year ago • 3 comments

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.

LevitatingLion avatar Jul 26 '22 19:07 LevitatingLion

Does rustc ignore unknown cfgs ? If so I'll see how we can add this

xldenis avatar Jul 26 '22 19:07 xldenis

Great, I'll work on setting up Creusot to set this cfg then

xldenis avatar Jul 26 '22 19:07 xldenis