From bfc13c6c977c4cd60fc8dec7bd2f1f0d0910b5ad Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Mon, 27 Mar 2023 18:06:49 +0900 Subject: [PATCH 1/4] Add support iOS --- Cargo.toml | 2 +- src/lib.rs | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index a464242..627c89d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,5 +13,5 @@ keywords = ["current", "process", "executable", "dylib", "dll"] [target.'cfg(windows)'.dependencies] winapi = { version = "0.3.9", features = ["errhandlingapi", "libloaderapi", "minwindef", "winerror" ] } -[target.'cfg(any(target_os="linux", target_os="freebsd", target_os="dragonfly", target_os="netbsd", target_os="macos", target_os="illumos", target_os="android"))'.dependencies] +[target.'cfg(any(target_os="linux", target_os="freebsd", target_os="dragonfly", target_os="netbsd", target_os="macos", target_os="illumos", target_os="android", target_os="ios"))'.dependencies] libc = "0.2.81" diff --git a/src/lib.rs b/src/lib.rs index bcea994..51d9133 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,6 +22,7 @@ //! * Windows //! * illumos //! * Android +//! * iOS use std::path::PathBuf; #[cfg(any(target_os = "linux", target_os = "illumos", target_os = "android"))] @@ -34,6 +35,11 @@ mod macos; #[cfg(target_os = "macos")] use macos as os; +#[cfg(target_os = "ios")] +mod ios; +#[cfg(target_os = "ios")] +use ios as os; + #[cfg(any(target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd"))] mod bsd; #[cfg(any(target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd"))] @@ -46,7 +52,8 @@ use bsd as os; target_os = "netbsd", target_os = "macos", target_os = "illumos", - target_os = "android" + target_os = "android", + target_os = "ios", ))] mod nix; From 9ffe6a785b056c78cf8e640cde9b20490457d32a Mon Sep 17 00:00:00 2001 From: HyodaKazuaki Date: Mon, 27 Mar 2023 18:09:20 +0900 Subject: [PATCH 2/4] Fix module name --- src/lib.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 51d9133..252bbe3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -30,16 +30,11 @@ mod linux; #[cfg(any(target_os = "linux", target_os = "illumos", target_os = "android"))] use linux as os; -#[cfg(target_os = "macos")] +#[cfg(any(target_os = "macos", target_os = "ios"))] mod macos; -#[cfg(target_os = "macos")] +#[cfg(any(target_os = "macos", target_os = "ios"))] use macos as os; -#[cfg(target_os = "ios")] -mod ios; -#[cfg(target_os = "ios")] -use ios as os; - #[cfg(any(target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd"))] mod bsd; #[cfg(any(target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd"))] From ad8bdd4822562105f8c34b60c0ccf778abda6346 Mon Sep 17 00:00:00 2001 From: Hiroshiba Date: Sun, 16 Apr 2023 00:26:11 +0900 Subject: [PATCH 3/4] Apply suggestions from code review --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 252bbe3..e02933e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,7 +22,7 @@ //! * Windows //! * illumos //! * Android -//! * iOS +//! * iOS use std::path::PathBuf; #[cfg(any(target_os = "linux", target_os = "illumos", target_os = "android"))] From 0f616e5298a281f360af607ad53517592d62c727 Mon Sep 17 00:00:00 2001 From: Hiroshiba Date: Sun, 16 Apr 2023 00:26:34 +0900 Subject: [PATCH 4/4] Apply suggestions from code review --- src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index e02933e..252bbe3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -22,7 +22,7 @@ //! * Windows //! * illumos //! * Android -//! * iOS +//! * iOS use std::path::PathBuf; #[cfg(any(target_os = "linux", target_os = "illumos", target_os = "android"))]