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§

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

Attribute Macros§

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