Visibility of flags emitted in build.rs


#1

If I use build.rs to emit a rustc-cfg=FEATURE, can that feature be manually enabled by users of my library? Should I prefix it with an underscore or something, to distinguish it from a “public” feature?


#2

A user can set anything in the RUSTFLAGS environment, including RUSTFLAGS="--cfg FEATURE". I would not call that “public” though, nor would I worry about breaking someone who did that, unless you had explicitly suggested using it that way.