This adds a Rustc struct which can be used to ensure that the rustc
command line is executed only once and then is a little bit more
ergonomic for making multiple repeated queries to over time. The
intention here is to make it easy to ask multiple "is the compiler at
least this version?" questions without having to run rustc more than
once and still using the built-in APIs here.
Ah good points! In the meantime I stumbled across the autocfg crate which at least solves the problems I was running into, so I'm gonna use that for now and close this.
This adds a
Rustc
struct which can be used to ensure that the rustc command line is executed only once and then is a little bit more ergonomic for making multiple repeated queries to over time. The intention here is to make it easy to ask multiple "is the compiler at least this version?" questions without having to run rustc more than once and still using the built-in APIs here.