From de226a26e8e18edbdb1d6f986afe37bbbf35fbf4 Mon Sep 17 00:00:00 2001 From: Hyoda Kazuaki Date: Sun, 16 Apr 2023 00:31:38 +0900 Subject: [PATCH] Support iOS (#1) Co-authored-by: Hiroshiba --- Cargo.toml | 2 +- src/lib.rs | 8 +++++--- 2 files changed, 6 insertions(+), 4 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..252bbe3 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"))] @@ -29,9 +30,9 @@ 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(any(target_os = "freebsd", target_os = "dragonfly", target_os = "netbsd"))] @@ -46,7 +47,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;