Skip to content

Commit

Permalink
WhoAmI 1.5.0 Release (#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
AldaronLau committed Mar 4, 2024
1 parent d6ee13e commit 358dc0e
Show file tree
Hide file tree
Showing 31 changed files with 1,748 additions and 980 deletions.
20 changes: 8 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
toolchain: ${{ matrix.tc }}
components: rustfmt, clippy
override: true
- run: cargo update
- run: cargo fmt --check
- run: cargo clippy -- -D warnings
checks-cross-compile:
Expand All @@ -43,6 +44,7 @@ jobs:
target: ${{ matrix.cc }}
components: clippy
override: true
- run: cargo update
- run: cargo clippy --all-features --target=${{ matrix.cc }} -- -D warnings
checks-cross-compile-ios:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -77,12 +79,8 @@ jobs:
target: ${{ matrix.cc }}
components: clippy
override: true
- run: cargo update -p bumpalo --precise 3.4.0
- run: cargo update -p web-sys --precise 0.3.55
- run: cargo update -p js-sys --precise 0.3.55
- run: cargo update -p wasm-bindgen --precise 0.2.78
- run: cargo update -p log --precise 0.4.17
- run: cargo clippy --all-features --target=${{ matrix.cc }} -- -D warnings
- run: cargo update
- run: cargo clippy --no-default-features --target=${{ matrix.cc }} -- -D warnings
- run: RUSTFLAGS="--cfg target_os=\"daku\"" cargo clippy --target=${{ matrix.cc }} -- -D warnings
test:
Expand Down Expand Up @@ -111,6 +109,7 @@ jobs:
profile: minimal
toolchain: ${{ matrix.tc }}
override: true
- run: cargo update
- run: cargo test --all --all-features --target=x86_64-apple-darwin
cross-compile:
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -165,6 +164,7 @@ jobs:
toolchain: ${{ matrix.tc }}
target: ${{ matrix.cc }}
override: true
- run: cargo update
- run: cargo build --all-features --target=${{ matrix.cc }}
cross-compile-wasm:
runs-on: ${{ matrix.os }}
Expand All @@ -181,14 +181,8 @@ jobs:
toolchain: ${{ matrix.tc }}
target: ${{ matrix.cc }}
override: true
- run: cargo update -p bumpalo --precise 3.4.0
- run: cargo update -p web-sys --precise 0.3.55
- run: cargo update -p js-sys --precise 0.3.55
- run: cargo update -p wasm-bindgen --precise 0.2.78
- run: cargo update -p log --precise 0.4.17
- run: cargo update -p quote --precise 1.0.30
- run: cargo update -p proc-macro2 --precise 1.0.63
- run: cargo build --all-features --target=${{ matrix.cc }}
- run: cargo update
- run: cargo build --no-default-features --target=${{ matrix.cc }}
- run: RUSTFLAGS="--cfg target_os=\"daku\"" cargo build --target=${{ matrix.cc }}
cross-compile-illumos:
Expand All @@ -206,6 +200,7 @@ jobs:
toolchain: ${{ matrix.tc }}
target: ${{ matrix.cc }}
override: true
- run: cargo update
- run: cargo build --all-features --target=${{ matrix.cc }}
cross-compile-redox:
runs-on: ${{ matrix.os }}
Expand All @@ -222,4 +217,5 @@ jobs:
toolchain: ${{ matrix.tc }}
target: ${{ matrix.cc }}
override: true
- run: cargo update
- run: cargo build --all-features --target=${{ matrix.cc }}
9 changes: 3 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
**/target/
**/*.rs.bk
Cargo.lock
/ignore/
/a.out
/**/build/
/**/target/
/**/*.swp
/build/
/**/*.rs.bk
23 changes: 18 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog], and this project adheres to
[Semantic Versioning].

## [1.5.0] - UNRELEASED
## [1.5.0] - 2024-03-03

### Added

Expand All @@ -19,27 +19,40 @@ The format is based on [Keep a Changelog], and this project adheres to
- `whoami::fallible::realname_os()`
- `whoami::fallible::username()`
- `whoami::fallible::username_os()`
- `whoami::Language`
- `whoami::Country`
- `whoami::langs()`
- `Language`
- `Country`
- `whoami::fallible::account()`
- `whoami::fallible::account_os()`
- `whoami::DesktopEnv::is_gtk()`
- `whoami::DesktopEnv::is_kde()`

### Removed

- Generated device names that infer casing based on the hostname when the
device name is not available - now returns the hostname unchanged
- Partial (potentially unsound) support for Android, iOS, watchOS, tvOS,
Fuchsia, Haiku, Solaris, and a few others. These targets now use the "fake"
implementation.

### Changed

- Deprecated `whoami::distro_os()`
- Deprecated `whoami::hostname()`
- Deprecated `whoami::hostname_os()`
- Deprecated `whoami::lang()`
- illumos and Redox are no longer untested targets
- Documented that illumos and Redox have a higher MSRV (Rust 1.65) than other
targets
- Display implementation on `Platform::Illumos` now displays in lowercase:
illumos

### Fixed

- Removed some unnecessary allocations
- Rare and nearly impossible cases of undefined behavior
- Better handling of UTF-8 non-conformant strings
- Multiple instances of undefined behavior on illumos

## [1.4.1] - 2023-06-25

Expand All @@ -51,7 +64,7 @@ The format is based on [Keep a Changelog], and this project adheres to

### Added

- Support for Illumos
- Support for illumos

## [1.3.0] - 2022-12-28

Expand All @@ -63,7 +76,7 @@ The format is based on [Keep a Changelog], and this project adheres to
architecture
- `Arch::width()` method which returns the address width of a CPU architecture
- *`web`* feature (enabled by default). Disabling this feature allows you to
use wasm32-unknown-unknown with whoami outside of the browser with a mock
use wasm32-unknown-unknown with whoami outside of the browser with a fake
implementation.
- Officially support compiling to WASI or Daku WebAssembly platforms;
functionality not supported yet.
Expand Down
166 changes: 166 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 11 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "whoami"
version = "1.5.0-pre.0"
version = "1.5.0"
edition = "2018"
license = "Apache-2.0 OR BSL-1.0 OR MIT"
documentation = "https://docs.rs/whoami"
homepage = "https://github.com/ardaku/whoami/blob/stable/CHANGELOG.md"
homepage = "https://github.com/ardaku/whoami/blob/v1/CHANGELOG.md"
repository = "https://github.com/ardaku/whoami"
readme = "README.md"
description = "Retrieve the current user and environment."
Expand All @@ -17,33 +17,30 @@ categories = [
"value-formatting",
]
include = [
"LICENSE_APACHE",
"LICENSE_BOOST",
"LICENSE_MIT",
"README.md",
"src/*",
"/LICENSE_APACHE",
"/LICENSE_BOOST",
"/LICENSE_MIT",
"/README.md",
"/src/*",
]
rust-version = "1.40"

# Target specific dependencies for redox
# Target specific dependency for redox
[target.'cfg(all(target_os = "redox", not(target_arch = "wasm32")))'.dependencies.redox_syscall]
version = "0.4"

# Target specific dependencies for wasite
# Target specific dependency for wasite
[target.'cfg(all(target_arch = "wasm32", target_os = "wasi"))'.dependencies.wasite]
version = "0.1"

# Target-specific dependency for wasm-bindgen
# Target-specific dependency for web browser
[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi"), not(target_os = "daku")))'.dependencies.web-sys]
version = "0.3"
features = ["Navigator", "Document", "Window", "Location"]
optional = true
[target.'cfg(all(target_arch = "wasm32", not(target_os = "wasi"), not(target_os = "daku")))'.dependencies.wasm-bindgen]
version = "0.2"
optional = true

[features]
default = ["web"]
# Enabling this feature indicates that the wasm32-unknown-unknown target should
# be assumed to be in a web environment where it can call DOM APIs.
web = ["web-sys", "wasm-bindgen"]
web = ["web-sys"]
Loading

0 comments on commit 358dc0e

Please sign in to comment.