From 2007762aef784e34e99e16b4e63ac40c38188f10 Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Tue, 5 Mar 2024 17:50:53 +0800 Subject: [PATCH] Initial AIX enablement --- Cargo.toml | 2 +- src/lib.rs | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 9aef592..bcb8e6c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ hardened = [] disable-wsl = [] wasm-console = ["web-sys/console"] -[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", target_os = "haiku"))'.dependencies] +[target.'cfg(any(target_os = "aix", target_os = "linux", target_os = "freebsd", target_os = "netbsd", target_os = "openbsd", target_os = "haiku"))'.dependencies] home = "0.5" [target.'cfg(target_os = "macos")'.dependencies] diff --git a/src/lib.rs b/src/lib.rs index 3c95f9c..1e9c886 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -23,6 +23,7 @@ //! | ios | ✅ | default only | ✅ | //! | wasm | ✅ | default only | ✅ | //! | haiku | ✅ (experimental) | default only | ❌ | +//! | aix | ✅ (experimental) | default only | ❌ | //! //! ## Consistent Behaviour //! `webbrowser` defines consistent behaviour on all platforms as follows: @@ -46,6 +47,7 @@ #[cfg_attr(windows, path = "windows.rs")] #[cfg_attr( any( + target_os = "aix", target_os = "linux", target_os = "freebsd", target_os = "netbsd", @@ -57,6 +59,7 @@ mod os; #[cfg(not(any( + target_os = "aix", target_os = "android", target_os = "windows", target_os = "macos", @@ -69,10 +72,11 @@ mod os; target_arch = "wasm32" )))] compile_error!( - "Only Windows, Mac OS, iOS, Linux, *BSD and Haiku and Wasm32 are currently supported" + "Only Windows, Mac OS, iOS, Linux, *BSD, Haiku, AIX and Wasm32 are currently supported" ); #[cfg(any( + target_os = "aix", target_os = "linux", target_os = "freebsd", target_os = "netbsd",