Struct crossbundle_tools::tools::AndroidNdk
source · [−]pub struct AndroidNdk { /* private fields */ }Expand description
Helper structure that contains information about the Android NDK Path and returns paths to the tools.
Implementations
sourceimpl AndroidNdk
impl AndroidNdk
sourcepub fn toolchain_dir(&self) -> Result<PathBuf>
pub fn toolchain_dir(&self) -> Result<PathBuf>
Operating system type
sourcepub fn clang(
&self,
target: AndroidTarget,
platform: u32
) -> Result<(PathBuf, PathBuf)>
pub fn clang(
&self,
target: AndroidTarget,
platform: u32
) -> Result<(PathBuf, PathBuf)>
Path to Clang
sourcepub fn toolchain_bin(
&self,
name: &str,
build_target: AndroidTarget
) -> Result<PathBuf>
pub fn toolchain_bin(
&self,
name: &str,
build_target: AndroidTarget
) -> Result<PathBuf>
Path to bin
sourcepub fn readelf(&self, build_target: AndroidTarget) -> Result<Command>
pub fn readelf(&self, build_target: AndroidTarget) -> Result<Command>
Displaying various information
sourcepub fn sysroot_lib_dir(&self, build_target: AndroidTarget) -> Result<PathBuf>
pub fn sysroot_lib_dir(&self, build_target: AndroidTarget) -> Result<PathBuf>
Sysroot and lib path
sourcepub fn sysroot_platform_lib_dir(
&self,
build_target: AndroidTarget,
min_sdk_version: u32
) -> Result<PathBuf>
pub fn sysroot_platform_lib_dir(
&self,
build_target: AndroidTarget,
min_sdk_version: u32
) -> Result<PathBuf>
Sysroot and lib platform
sourcepub fn find_ndk_path<F>(platform: u32, path_builder: F) -> Result<PathBuf> where
F: Fn(u32) -> PathBuf,
pub fn find_ndk_path<F>(platform: u32, path_builder: F) -> Result<PathBuf> where
F: Fn(u32) -> PathBuf,
Helper function for looking for a path based on the platform version Calls a closure for each attempt and then return the PathBuf for the first file that exists. Uses approach that NDK build tools use which is described at: https://developer.android.com/ndk/guides/application_mk “ - The platform version matching APP_PLATFORM.
- The next available API level below APP_PLATFORM. For example, android-19 will be used when APP_PLATFORM is android-20, since there were no new native APIs in android-20.
- The minimum API level supported by the NDK.“
Trait Implementations
sourceimpl Clone for AndroidNdk
impl Clone for AndroidNdk
sourcefn clone(&self) -> AndroidNdk
fn clone(&self) -> AndroidNdk
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
Auto Trait Implementations
impl RefUnwindSafe for AndroidNdk
impl Send for AndroidNdk
impl Sync for AndroidNdk
impl Unpin for AndroidNdk
impl UnwindSafe for AndroidNdk
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more