Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WhoAmI 1.5.0 Release #94

Merged
merged 25 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
027626a
Split lib.rs into modules
AldaronLau Mar 3, 2024
b93a65f
Add testing section to readme
AldaronLau Mar 3, 2024
35d9d49
Finally make use `Target::langs()`
AldaronLau Mar 3, 2024
40c152b
Fix some errors / warnings
AldaronLau Mar 3, 2024
941336d
Fix Windows
AldaronLau Mar 3, 2024
b63719c
More fixes
AldaronLau Mar 3, 2024
6366fb9
Remove unused function
AldaronLau Mar 3, 2024
f5b0a81
Commit Cargo.lock
AldaronLau Mar 3, 2024
cc634d6
Switch references of Illumos -> illumos
AldaronLau Mar 3, 2024
7c6138a
Update branch references
AldaronLau Mar 3, 2024
4176f99
Add `fallible::account()` and `fallible::account_os()`
AldaronLau Mar 3, 2024
5736c05
Support AzureAD login
AldaronLau Mar 3, 2024
52886a8
Don't use negative cfg gating on unix
AldaronLau Mar 3, 2024
b72b43c
Linux / Fedora Testing
AldaronLau Mar 3, 2024
22f6fa2
Add `DesktopEnv::is_gtk()` and `DesktopEnv::is_kde()`
AldaronLau Mar 3, 2024
5ffa541
Fix windows issues from testing
AldaronLau Mar 4, 2024
0f9578a
Document testing procedure for Windows and Ubuntu
AldaronLau Mar 4, 2024
af59219
Document BSD testing, fix "C" language handling
AldaronLau Mar 4, 2024
4768c25
Fix output
AldaronLau Mar 4, 2024
59de0a1
All tests are complete
AldaronLau Mar 4, 2024
bf98778
Update testing
AldaronLau Mar 4, 2024
7347dbf
Update CHANGELOG
AldaronLau Mar 4, 2024
ea301b4
Update CHANGELOG
AldaronLau Mar 4, 2024
0d9a6c2
Edit include in Cargo.toml
AldaronLau Mar 4, 2024
326bce7
Merge branch 'more-whoami-1.5.0-patches' of github.com:ardaku/whoami …
AldaronLau Mar 4, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading