Function build_data::get_hostname[][src]

pub fn get_hostname() -> Result<String, String>

Gets the name of the current machine.

Cargo doesn’t pass the HOSTNAME env var to build scripts. Uses the hostname command.

Errors

Returns an error if it fails to execute the hostname command.