Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@ keywords = ["dyld", "dylib", "shared", "library", "dl_iterate_phdr"]
license = "MIT OR Apache-2.0"
readme = "./README.md"
repository = "https://github.com/gimli-rs/findshlibs"
rust-version = "1.82"

[dependencies]
libc = "0.2.104"

[build-dependencies]
# Only needed for Android, but cannot be target dependent
# https://github.com/rust-lang/cargo/issues/4932
cc = "1.0.67"

[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
lazy_static = "1.4"

Expand Down
41 changes: 0 additions & 41 deletions build.rs

This file was deleted.

4 changes: 0 additions & 4 deletions src/android-api.c

This file was deleted.

15 changes: 4 additions & 11 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,25 +100,18 @@
#[cfg(any(target_os = "macos", target_os = "ios"))]
pub mod macos;

#[cfg(any(
target_os = "linux",
all(target_os = "android", feature = "dl_iterate_phdr")
))]
#[cfg(any(target_os = "linux", target_os = "android"))]
pub mod linux;

#[cfg(target_os = "windows")]
pub mod windows;

use std::ffi::OsStr;
use std::fmt::{self, Debug};
use std::usize;

pub mod unsupported;

#[cfg(any(
target_os = "linux",
all(target_os = "android", feature = "dl_iterate_phdr")
))]
#[cfg(any(target_os = "linux", target_os = "android"))]
use crate::linux as native_mod;

#[cfg(any(target_os = "macos", target_os = "ios"))]
Expand All @@ -131,7 +124,7 @@ use crate::windows as native_mod;
target_os = "macos",
target_os = "ios",
target_os = "linux",
all(target_os = "android", feature = "dl_iterate_phdr"),
target_os = "android",
target_os = "windows"
)))]
use unsupported as native_mod;
Expand All @@ -145,7 +138,7 @@ pub const TARGET_SUPPORTED: bool = cfg!(any(
target_os = "macos",
target_os = "ios",
target_os = "linux",
all(target_os = "android", feature = "dl_iterate_phdr"),
target_os = "android",
target_os = "windows"
));

Expand Down