Registry / utility / gethostname

gethostname

JSON →
library1.1.0rscratesunverified

Get the hostname for all platforms.

# Cargo.toml [dependencies] gethostname = "1.1.0"
INSTALL
IMPORT
SIG · GETHOSTNAME
G
gethostname
utilityrustv1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gethostname
✓ use gethostname::gethostname;

Retrieves the system hostname.

use gethostname::gethostname; fn main() { let hostname = gethostname(); println!("Hostname: {:?}", hostname); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
1.1.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
gethostname — cargo add gethostname · libregistry