Realia

This crate provides macros for conditional compilation based on various checks. These macros are analogous to #[cfg(...)] and #[cfg_attr(...)].

Realia is inspired by and heavily based on rustversion.

Attributes

Primary:

The above can be refined or augmented by these additional attributes:

Triggering build on changed conditions

To trigger builds when the conditions change, you'll need to include a build.rs in your project with the environment variables you check.

```rust fn main() { // Necessary when using #[realia::env("FOO")] println!("cargo:rerun-if-env-changed=FOO");

// Necessary when using #[realia::cmd(...)]
println!("cargo:rerun-if-env-changed=PATH");

} ```