[][src]Function target_cpu_fetch::target_cpu

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

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.