lukaslueg / built

Provides a crate with information from the time it was built.
MIT License
157 stars 31 forks source link

Add support for CARGO_CFG_TARGET_FEATURE #40

Open akanalytics opened 3 years ago

akanalytics commented 3 years ago

Would it be possible to add support for CARGO_CFG_TARGET_FEATURE. Typical example might be "mmx,sse" This would allow programs to report on how optimized they are for various processors (using SIMD instructions etc). Would be useful for chess engines written in rust :-)

lukaslueg commented 3 years ago

AFAICS there is currently no reliable way to do this; it's is a long-standing issue with rustc, tracked among others in https://github.com/rust-lang/rust/issues/44036. Also see https://github.com/rust-lang/cargo/issues/7828