Function target_cpu

Source
pub fn target_cpu() -> Result<Option<String>, String>
Expand description

Returns the name of the target CPU.

Looks at the name of the current target specification JSON passed to rustc and derives that target from it.

If there is an error during the lookup, Err(message) is returned. If the target specification could be found, but it was empty, then Ok(None) is returned.