Skip to content
forked from ardaku/whoami

Rust crate to get the current user and environment.

License

Apache-2.0 and 2 other licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
BSL-1.0
LICENSE_BOOST
MIT
LICENSE_MIT
Notifications You must be signed in to change notification settings

oxidecomputer/whoami

 
 

WhoAmI Logo

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

Retrieve the current user and environment through simple functions.

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" 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)
  • Web Assembly
    • Mock implementation
    • Web Browser - DOM
    • WASI (Wasite, others) may partially or fully work - but untested
    • Daku (Ardaku/Quantii, others) mock implementation, full implementation planned later
  • illumos variants (SmartOS, OmniOS, others) may partially or fully work - but untested
  • Android may partially or fully work - but untested, planned later
  • iOS planned later
  • Redox planned later
  • Fuchsia planned later
  • Various game consoles planned later
  • Others? (make a PR or open an issue)

MSRV

WhoAmI 1.x.y targets Rust 1.40.0 stable and later, and the 1.x.y track will be maintained at least until the release of the Rust 2024 edition.

The MSRV will only be updated on major version bumps, and version 2.0.0 will target Rust 1.65.0 and later to make use of the let else syntax.

Binary

whome: whoami command RiR (Re-written in Rust) that depends on this crate.

License

Copyright © 2017-2024 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.

About

Rust crate to get the current user and environment.

Resources

License

Apache-2.0 and 2 other licenses found

Licenses found

Apache-2.0
LICENSE_APACHE
BSL-1.0
LICENSE_BOOST
MIT
LICENSE_MIT

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%