$ whoami

v2.0.2

Rust library for getting information about the current user and environment

Downloads: 94.5M
Recent: 16.7M
Versions: 53
Updated: January 9, 2026

Latest Update Summary

Crate

Name: whoami New version: 2.0.0 Release date: 2026-01-03T17:20:01.576937Z

Crate readme

Short description Rust library for getting information about the current user and environment.

Long description WhoAmI is a Rust library that provides various functionalities to retrieve information about the user and the environment, including the user's full name, username, preferred languages, device hostname, desktop environment, OS name and version, platform name, and CPU architecture. It supports multiple platforms such as Linux, Windows, Mac OS, and provides future support for mobile and Web Assembly. The Maintained and updated MSRV guidelines ensure consistent performance across versions.

Features • Get the user's full name • Get the user's username • Get the user's preferred language(s) • Get the devices's hostname • Get the devices's 'pretty hostname' or 'fancy name' • Get the devices's desktop environment • Get the devices's OS name and version • Get the devices's platform name • Get the devices's CPU architecture and its width

Code Examples Basic usage

 let username = whoami::username();

Getting the user's full name

 let full_name = whoami::full_name();

Linkshttps://crates.io/crates/whoamihttps://docs.rs/whoamihttps://github.com/ardaku/whoamihttps://github.com/ardaku/whoami/releaseshttps://github.com/ardaku/.github/blob/v1/profile/MSRV.md

https://docs.rs/whoami https://api.github.com/repos/ardaku/whoami/releases/273980280

Release info

Release version:

Release description

Code Examples

Patch update: 2.0.1 → 2.0.2

$ DOWNLOADS TREND

77.5M94.5M

$ VERSION HISTORY

v2.0.2January 9, 2026
v2.0.1January 8, 2026
v2.0.0January 3, 2026
v2.0.0-pre.3August 11, 2025

$ LINKS

$ INSTALL

cargo add whoami

Or add to Cargo.toml: whoami = "2.0.2"