Registry / utility / whoami

whoami

JSON →
library2.1.2rscratesunverified

Retrieves information about the current user and environment, such as username, hostname, and platform.

# Cargo.toml [dependencies] whoami = "2.1.2"
INSTALL
IMPORT
SIG · WHOAMI
W
whoami
utilityrustv2.1.2
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.

username
use whoami::username;

Prints the current system username.

use whoami::username; fn main() { println!("Current user: {}", username()); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2.1.2latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
whoami — cargo add whoami · libregistry