Jeryn Aldaron Lau 4ceba2bf26
v1 -> v2: Windows linkage fix (#186)
* Windows linkage fix

* Release v1.6.0

* Update changelog

* Update CHANGELOG

* Update web example

* Add release date to changelog

* Windows linkage fix

* Full versions, remove unused Cargo.lock

* Remove rust-toolchain in web example
2025-04-07 01:00:16 +00:00
2024-03-04 04:33:19 +00:00
2020-12-30 19:37:49 -06:00
2022-09-05 12:47:08 -05:00
2025-03-12 05:36:35 +00:00
2024-03-04 04:33:19 +00:00

WhoAmI Logo

Changelog | Source | Getting Started

tests GitHub commit activity GitHub contributors
Crates.io Crates.io Crates.io (recent)
Crates.io Docs.rs

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

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 aldaronlau@gmail.com.

Description
Rust crate to get the current user and environment.
Readme 1.2 MiB
Languages
Rust 100%