whoami
Rust library for getting information about the current user and environment
2.1.3
192M downloads/mo
#519 most downloaded on crates.io
ardaku/whoami
What this package is like to depend on
Last release 12 days ago
11 Aug 2026
Release timing varies
gaps range from 8 days to 5 months
Rarely documented
notes for 9 of 50 stable releases
1 version withdrawn
withdrawn after publishing
9 years old
59 releases · first in 2017
9 releases in the last 12 months
see the full history below
Release timeline
59 releases · Aug 2017 to Aug 2026Releases
latest 59-
2.1.311 Aug 2026Release notes
Open source →Changelog
Added
- Support for detecting the Mate desktop environment
Changed
- Bumped minimum version of dependencies libc and libredox to latest (libc 0.2.189, libredox 0.1.19)
What's Changed
- Add checks in CI for wasm32-wasip2 by @AldaronLau in #239
- ci: Fix branch matching by @AldaronLau in #240
- Bump libredox from 0.1.16 to 0.1.17 by @dependabot[bot] in #241
- Bump libredox from 0.1.17 to 0.1.18 by @dependabot[bot] in #242
- Bump libc from 0.2.186 to 0.2.189 by @dependabot[bot] in #244
- Bump libredox from 0.1.18 to 0.1.19 by @dependabot[bot] in #245
- Support MATE desktop environment detection by @alloutflo in #246
- Simplify the desktop environment branching code by @AldaronLau in #247
New Contributors
- @alloutflo made their first contribution in #246
Full Changelog: v2.1.2...v2.1.3
-
2.1.227 Apr 2026Release notes
Open source →Changelog
Changed
- Update minimum libc to 2.186
- Update minimum libredox to 0.1.16
Fixed
- Compilation for wasm32-wasip2
What's Changed
- Collapse
ifin match on unix by @AldaronLau in #229 - Bump libredox from 0.1.12 to 0.1.16 by @dependabot[bot]
- Bump libc from 0.2.181 to 0.2.186 by @dependabot[bot]
- Fix compilation on wasm32-wasip2 by @nicolasauler in #233
- Prepare v2.1.2 by @AldaronLau in #238
New Contributors
- @nicolasauler made their first contribution in #233
Full Changelog: v2.1.1...v2.1.2
-
2.1.110 Feb 2026Release notes
Open source →Changelog
Added
- Support for other Apple targets (untested)
Changed
- Improved unix-like implementations - now depends on libc, and objc2-system-configuration on macOS
- Updated web-sys to 0.3.85
What's Changed
- Add initial dependency on libc by @AldaronLau in #221
- Switch out unix defs for ones in the libc crate by @AldaronLau in #222
- Reduce code duplication in unix implementation by @AldaronLau in #223
- Add dependency objc2-system-configuration for MacOS by @AldaronLau in #224
- Bump libc from 0.2.180 to 0.2.181 by @dependabot[bot] in #226
- Bump version to 2.1.1 by @AldaronLau in #225
Full Changelog: v2.1.0...v2.1.1
-
2.1.028 Jan 2026Release notes
Open source →Changelog
Added
- Add to
DesktopEnvironmentenum variantsNiri,Hyprland,Cosmic
Changed
- Bumped MSRV to 1.75
What's Changed
- Add desktop environments: niri, hyprland and cosmic by @RuairidhWilliamson in #218
New Contributors
- @RuairidhWilliamson made their first contribution in #218
Full Changelog: v2.0.3...v2.1.0
- Add to
-
2.0.427 Apr 2026Release notes
Open source → -
2.0.328 Jan 2026Release notes
Open source →Changelog
Fixed
- License files not being included in the package (again, switching to a workspace broke it)
What's Changed
- Fix missing license files in published crates by @musicinmybrain in #219
- Prepare v2.0.3 by @AldaronLau in #220
New Contributors
- @musicinmybrain made their first contribution in #219
Full Changelog: v2.0.2...v2.0.3
-
2.0.209 Jan 2026Release notes
Open source →Changelog
Fixed
- Crate not compiling when
stdfeature isn't set (#215)
What's Changed
- Test no-std in C/I by @AldaronLau in #216
- Prepare v2.0.2 by @AldaronLau in #217
Full Changelog: v2.0.1...v2.0.2
- Crate not compiling when
-
2.0.108 Jan 2026Release notes
Open source →Changelog
Fixed
- MSRV testing in CI actually works again
- MSRV mishap - WhoAmI 2.0.0 was requiring an MSRV of 1.81 accidentally, due to using
core::error::Error, changed so that when thestdfeature is enabled the MSRV is as-advertised - 1.65. Updated MSRV documentation to reflect that when thestdfeature is disabled it bumps the MSRV to 1.81 - Fixed Daku reporting 64-bit when 32-bit in
cpu_arch()implementation - Fixed environment variable typo
LC_MONTEARY->LC_MONETARY - Fixed
whoami::Errorhaving infinite recursion in theDisplayimplementation - Fixed Broken links in the README.md
- Updated wasite minimum version to v1.0.2 to fix MSRV issues on WASI
What's Changed
- Fix architecture detection bug in Daku OS by @paolobarbolini in #206
- Fix typo in
LC_MONETARYenv var name by @paolobarbolini in #205 - Fix recursive Display implementation in Error type by @paolobarbolini in #209
- Update MSRV docs in README and fix broken links by @AldaronLau in #210
- Downgrade wasi in
Cargo.lock, fix doc error by @AldaronLau in #211 - Restore MSRV support and CI checks by @paolobarbolini in #204
- Prepare v2.0.1 by @AldaronLau in #212
New Contributors
- @paolobarbolini made their first contribution in #206
Full Changelog: v2.0.0...v2.0.1
-
2.0.003 Jan 2026 withdrawnRelease notes
Open source →Changelog
Added
- Added
LanguagePreferences - Added
Error, which implementsInto<std::io::Error> - no-std support
- Better docs around hostnames and platform-specific limitations
#[must_use]to applicable functions- Support checking for
Xfcedesktop environment
Changed
- MSRV updated to 1.65, upgraded to 2021 edition
- Rename
Platform::MacOStoPlatform::Mac - Rename
Platform::NintendotoPlatform::Nintendo3ds - When checking pointer width, if can't be determined return
ErrorKind::Unsupportedinstead ofErrorKind::Other *::Unknown(_)variants are now defined at the top of enums- Updated libredox to v0.1.12
desktop_env()now returns anOption- returningNonewhen no desktop environment is applicable (such as over SSH)- Feature set changed to:
force-stub: Only compile to stub backendstd: Depend on the standard library (default feature)wasi-wasite: Assume Wasite environment variables are defined when compiling to wasi targets (default feature)wasm-web: Assume wasm with unknown OS is being compiled for a web page (default feature)
- Rename
arch()/Archtocpu_arch()/CpuArchitecture - Rename
DesktopEnvtoDesktopEnvironment Languageis now a struct instead of an enum- Language fallbacks without the country are appended at the end of language iteration
DesktopEnv::WebBrowservariant now includes browser name and versiondevicename()on web target now always returns "Browser"hostname()on web target now returns the webpage URL instead of "localhost"DesktopEnvironment::is_gtk()andDesktopEnvironment::is_kde()are nowconstand marked with#[must_use]- Update wasite target dependency to 1.0.0
distro()now reports Windows 11 as Windows 11 instead of 10
Removed
- Removed
Platform::Xbox - Remove all infallible function variants, and remove the
falliblemodule, moving those functions to the root module - Remove deprecated
lang() - Remove
langs()in favor oflang_prefs() Language::country(),Country- Unnecessary
#[non_exhaustive]attributes
What's Changed
- WhoAmI 2.0: 2021 edition by @AldaronLau in #100
- Make major 2.0 breaking changes by @AldaronLau in #101
- Deny doc warnings by @AldaronLau in #105
- Test docs in CI by @AldaronLau in #107
- V2: Update redox_syscall to v0.5.1 by @AldaronLau in #112
- Keep V2 up to date with V1 patches by @AldaronLau in #123
- V2: Make
desktop_env()return anOptionby @AldaronLau in #125 - Use std::ffi everywhere instead of std::os::raw (#122) by @AldaronLau in #127
- CI: Make cross compile clippy a separate action by @AldaronLau in #128
- Update copyright by @AldaronLau in #129
- Update readme with new MSRV policy by @AldaronLau in #131
- Fix clippy duplicate attribute for MacOS by @AldaronLau in #134
- Update wasm-bindgen to v0.2.100 by @AldaronLau in #137
- Update platform dependencies by @AldaronLau in #139
- Check more environment variables for language by @AldaronLau in #144
- Switch Windows
hostname()to returnPhysicalDnsHostnameby @AldaronLau in #147 - Improved error handling by @robertbacula in #136
- Adjusts
langs()to match POSIX locale spec by @cjohnson19 in #150 - Bump version to "2.0.0-pre.1" by @AldaronLau in #152
- Fix license link by @AldaronLau in #153
- upsteam v1 -> v2: Add discriminants to
ExtendedNameFormatenum by @AldaronLau in #157 - Add ability to get language prefs for categories by @cjohnson19 in #155
- Bump version to 2.0.0-pre.2 by @AldaronLau in #159
- Try new templates by @AldaronLau in #160
- More template changes by @AldaronLau in #161
- Fix reading escaped unix pretty names by @AldaronLau in #164
- Remove some TODOs now that dedicated issues exist by @AldaronLau in #177
- Fix
LanguagePrefsimpl ofDisplayby @cjohnson19 in #179 - Update crate description by @AldaronLau in #181
- CI: Turn off auto install for rustup by @AldaronLau in #182
- Migrate to workspace and define xtask by @cjohnson19 in #180
- CI: only cross-compile whoami library by @AldaronLau in #184
- Update Release PR template (v1.6.0) by @AldaronLau in #183
- v1 -> v2: Windows linkage fix by @AldaronLau in #186
- Replace redox_syscall with libredox by @AldaronLau in #189
- Bump libredox from 0.1.9 to 0.1.10 by @dependabot[bot] in #191
- Change web behavior for whoami 2.0 by @DynoW in #192
- docs: document platform-specific hostname character limits by @naoNao89 in #194
- Bump libredox from 0.1.10 to 0.1.11 by @dependabot[bot] in #196
- Finalize Language API for whoami 2.0 by @AldaronLau in #198
- Bump libredox from 0.1.11 to 0.1.12 by @dependabot[bot] in #199
- Final changes preparing for whoami 2.0 by @AldaronLau in #200
- Add some
must_uses, organize attributes, remove redundantnon_exhaustive, fix small copypaste bug (Wasm64) by @BioTomateDE in #201 - Release v2.0.0 by @AldaronLau in #163
New Contributors
- @robertbacula made their first contribution in #136
- @cjohnson19 made their first contribution in #150
- @DynoW made their first contribution in #192
- @naoNao89 made their first contribution in #194
- @BioTomateDE made their first contribution in #201
Full Changelog: v1.6.0...v2.0.0
- Added
-
2.0.0-pre.311 Aug 2025 pre-releaseNothing published for this version
-
2.0.0-pre.207 Mar 2025 pre-releaseNothing published for this version
-
2.0.0-pre.126 Feb 2025 pre-releaseNothing published for this version
-
2.0.0-pre.019 Nov 2024 pre-releaseNothing published for this version
-
1.6.111 Aug 2025Nothing published for this version
-
1.6.023 Mar 2025Release notes
Open source →Changelog
Added
- Support for GNU/Hurd
Changed
- Removed comment about hostname being limited to ASCII due to Unicode hostnames being supported on Windows
- More descriptive error messages on the web target
Fixed
account()always returning username instead of user principal name on Windowslangs()now returns a list accurate to the POSIX locale spechostname()on Windows now returnsPhysicalDnsHostnameinstead ofNetBIOSdevicename(): Fixed reading escaped unix pretty names- Link error on Windows (in future Rust version)
What's Changed
- Remove comment about hostname being limited to ASCII by @davidkna in #119
- Add support for GNU/Hurd by @pinotree in #120
- Apply target rename wasm32-wasip1 by @AldaronLau in #124
- Backport Update copyright (#129) by @AldaronLau in #130
- Bump version to 1.6.0-pre.0 by @AldaronLau in #132
- Backport v2 -> v1: Fix clippy duplicate attribute for MacOS by @AldaronLau in #135
- v1: Update wasm-bindgen to v0.2.89 by @AldaronLau in #138
- Backport v2 -> v1: Check more environment variables for language by @AldaronLau in #146
- Backport v2 -> v1: Switch Windows
hostname()to returnPhysicalDnsHostnameby @AldaronLau in #148 - Backport v2 -> v1: Improved error handling by @AldaronLau in #149
- 1.6.0-pre.1 and Backport v2 -> v1: Adjusts langs() to match POSIX locale spec by @AldaronLau in #151
- Backport v2 -> v1: Fix license link by @AldaronLau in #154
- Add discriminants to ExtendedNameFormat enum by @Batch21 in #156
- Version 1.6.0 pre.2 by @AldaronLau in #158
- Backport v2->v1: Fix reading escaped unix pretty names by @AldaronLau in #178
- Release v1.6.0 by @AldaronLau in #162
New Contributors
- @davidkna made their first contribution in #119
- @pinotree made their first contribution in #120
- @Batch21 made their first contribution in #156
Full Changelog: v1.5.2...v1.6.0
-
1.6.0-pre.207 Mar 2025 pre-releaseNothing published for this version
-
1.6.0-pre.126 Feb 2025 pre-releaseNothing published for this version
-
1.6.0-pre.011 Jan 2025 pre-releaseNothing published for this version
-
1.5.203 Sep 2024Nothing published for this version
-
1.5.110 Mar 2024Nothing published for this version
-
1.5.004 Mar 2024Nothing published for this version
-
1.5.0-pre.014 Feb 2024 pre-releaseNothing published for this version
-
1.4.126 Jun 2023Nothing published for this version
-
1.4.012 Mar 2023Nothing published for this version
-
1.3.029 Dec 2022Nothing published for this version
-
1.2.313 Sep 2022Nothing published for this version
-
1.2.205 Sep 2022Nothing published for this version
-
1.2.125 Nov 2021Nothing published for this version
-
1.2.006 Nov 2021Nothing published for this version
-
1.1.529 Sep 2021Nothing published for this version
-
1.1.426 Sep 2021Nothing published for this version
-
1.1.317 Aug 2021Nothing published for this version
-
1.1.203 Apr 2021Nothing published for this version
-
1.1.114 Mar 2021Nothing published for this version
-
1.1.017 Jan 2021Nothing published for this version
-
1.0.331 Dec 2020Nothing published for this version
-
1.0.231 Dec 2020Nothing published for this version
-
1.0.116 Dec 2020Nothing published for this version
-
1.0.023 Nov 2020Nothing published for this version
-
0.9.025 Jun 2020Nothing published for this version
-
0.8.211 Jun 2020Nothing published for this version
-
0.8.122 Feb 2020Nothing published for this version
-
0.8.021 Feb 2020Nothing published for this version
-
0.7.021 Dec 2019Nothing published for this version
-
0.6.026 Oct 2019Nothing published for this version
-
0.5.319 Jul 2019Nothing published for this version
-
0.5.213 May 2019Nothing published for this version
-
0.5.113 May 2019Nothing published for this version
-
0.5.017 Mar 2019Nothing published for this version
-
0.4.112 Jan 2019Nothing published for this version
-
0.4.012 Jan 2019Nothing published for this version
-
0.3.004 Jan 2019Nothing published for this version
-
0.2.404 Dec 2018Nothing published for this version
-
0.2.327 Nov 2018Nothing published for this version
-
0.2.202 Jun 2018Nothing published for this version
-
0.2.102 Jun 2018Nothing published for this version
-
0.2.029 Dec 2017Nothing published for this version
-
0.1.104 Aug 2017Nothing published for this version
-
0.1.004 Aug 2017Nothing published for this version