SergioBenitez / version_check

Rust library for checking the installed/running rustc's version.
https://docs.rs/version_check
Apache License 2.0
50 stars 14 forks source link

Add a persistent struct to query versions for #5

Closed alexcrichton closed 5 years ago

alexcrichton commented 5 years ago

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.

alexcrichton commented 5 years ago

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.