Expand description
Realia provides attribute macros for conditional compilation,
analogous to #[cfg(...)] and #[cfg_attr(...)].
Attribute Macrosยง
- all
- Checks if multiple conditions are met.
- any
- Checks if at least one of multiple conditions is met.
- attr
- Applies an attribute when the condition is met.
You can also specify
constthis way. - cmd
- Checks whether an executable exists on the
PATH. - dep
- Checks whether a crate has a certain dependency and optionally if that dependency is a certain version.
- dep_
before - Checks whether a crate has a certain dependency below a certain version.
- dep_
from_ registry - Checks whether a crate has a certain dependency installed from the registry (as opposed to being a Git dependency or a path dependency). This is useful if you have non-registry dependencies with a registry fallback for publishing.
- dep_
since - Checks whether a crate has a certain dependency at or above a certain version.
- env
- Checks whether an environment variable is defined and optionally what value it has.
- not
- Inverts another condition.