Crate target_cpu_macro

Source
Expand description

A crate used to query the current target CPU for a crate.

Provides macros for fetching the target CPU name, and custom attributes that can be used to conditionally enable code based on that CPU.

Uses the crate target-cpu-fetch to drive the logic.

Macros§

cpu_name
Expands into a &'static str string literal containing the current CPU name.
maybe_cpu_name
Expands into a Option<&'static str> containing the current CPU name.

Attribute Macros§

cfg_target_cpu_eq
Conditionally enables a piece of code if the target CPU has the specified name.
cfg_target_cpu_neq
Conditionally enables a piece of code if the target CPU does not have the specified name.