https://github.com/ardaku/whoami
Rust library for getting information about the current user and environment.
https://github.com/ardaku/whoami
hostname preferred-languages rust rust-crate rust-library username whoami
Last synced: 2 days ago
JSON representation
Rust library for getting information about the current user and environment.
- Host: GitHub
- URL: https://github.com/ardaku/whoami
- Owner: ardaku
- License: apache-2.0
- Created: 2017-07-29T23:50:05.000Z (over 7 years ago)
- Default Branch: v2
- Last Pushed: 2025-03-23T23:28:56.000Z (22 days ago)
- Last Synced: 2025-04-05T18:03:38.590Z (9 days ago)
- Topics: hostname, preferred-languages, rust, rust-crate, rust-library, username, whoami
- Language: Rust
- Homepage: https://docs.rs/whoami
- Size: 758 KB
- Stars: 221
- Watchers: 3
- Forks: 34
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE_APACHE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
- awesome-rust - ardaku/whoami
- jimsghstars - ardaku/whoami - Rust crate to get the current user and environment. (Rust)
README
![WhoAmI Logo]
#### [Changelog] | [Source] | [Getting Started]
[](https://github.com/ardaku/whoami/actions/workflows/ci.yml)
[](https://github.com/ardaku/whoami/)
[](https://github.com/ardaku/whoami/graphs/contributors)
[](https://crates.io/crates/whoami)
[](https://crates.io/crates/whoami)
[](https://crates.io/crates/whoami)
[](https://github.com/search?q=repo%3Aardaku%2Fwhoami+path%3A**%2FLICENSE*&type=code)
[](https://docs.rs/whoami/)Rust library for getting information about the current user and environment.
Check out the [documentation] for examples.
### 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### Supported Platforms
WhoAmI targets all platforms that can run Rust, including:
- Linux
- Windows
- Mac OS
- BSD variants (FreeBSD, others)
- illumos variants (SmartOS, OmniOS, others)
- Redox
- [Web Assembly]
- Fake implementation
- Web Browser - DOM
- WASI (Wasite, others) **untested, testing planned later**
- Daku (Ardaku/Quantii, others) **planned later**
- Android **planned later**
- iOS / watchOS / tvOS **planned later**
- Fuchsia **planned later**
- GNU/Hurd **untested**
- Others? (make a PR or open an issue)## MSRV
MSRV is updated according to the [Ardaku MSRV guidelines], so it will only get
updated on minor and major version bumps. All 2.x releases will be maintained
with bugfixes until the end of 2027 at minimum.- WhoAmI 2.2: Rust 1.85 MSRV (bump to get the 2024 edition)
- WhoAmI 2.1: Rust 1.75 MSRV (bump to pull in nix, etc.)
- WhoAmI 2.0: Rust 1.65 MSRV (support based on original 2.0 plan)
- WhoAmI 1.x: Rust 1.40 MSRV (old MSRV policy, maintained until end of 2025 at
minimum)## Binary
[whome] - `whoami` command RiR (Re-written in Rust) that depends on this crate.
## Testing
The interactive testing procedure is documented in the release PR template. The
full manual test suite is run for each change that affects multiple platforms.## License
Copyright © 2017-2025 The WhoAmI Contributors.
Licensed under any of
- Apache License, Version 2.0, ([LICENSE_APACHE] or
)
- Boost Software License, Version 1.0, ([LICENSE_BOOST] or
)
- MIT License, ([LICENSE_MIT] or )at your option.
### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
licensed as described above, without any additional terms or conditions.## Help
If you want help using or contributing to this library, feel free to send me an
email at .[Changelog]: https://github.com/ardaku/whoami/releases
[Source]: https://github.com/ardaku/whoami
[Getting Started]: https://docs.rs/whoami#getting-started
[documentation]: https://docs.rs/whoami
[LICENSE_APACHE]: https://github.com/ardaku/whoami/blob/v2/LICENSE_APACHE
[LICENSE_MIT]: https://github.com/ardaku/whoami/blob/v2/LICENSE_MIT
[LICENSE_BOOST]: https://github.com/ardaku/whoami/blob/v2/LICENSE_BOOST
[Ardaku MSRV guidelines]: https://github.com/ardaku/.github/blob/v1/profile/MSRV.md
[WhoAmI Logo]: https://raw.githubusercontent.com/ardaku/whoami/v2/res/icon.svg
[Web Assembly]: https://github.com/ardaku/whoami/blob/v2/WASM.md
[whome]: https://crates.io/crates/whome