pub struct AndroidBuilder { /* private fields */ }Expand description
Android builder that handles the complete build pipeline
Implementations§
Source§impl AndroidBuilder
impl AndroidBuilder
Sourcepub fn new(
project_root: impl Into<PathBuf>,
crate_name: impl Into<String>,
) -> Self
pub fn new( project_root: impl Into<PathBuf>, crate_name: impl Into<String>, ) -> Self
Creates a new Android builder
§Arguments
project_root- Root directory containing the bench-mobile cratecrate_name- Name of the bench-mobile crate (e.g., “my-project-bench-mobile”)
Sourcepub fn build(&self, config: &BuildConfig) -> Result<BuildResult, BenchError>
pub fn build(&self, config: &BuildConfig) -> Result<BuildResult, BenchError>
Builds the Android app with the given configuration
This performs the following steps:
- Build Rust libraries for Android ABIs using cargo-ndk
- Generate UniFFI Kotlin bindings
- Copy .so files to jniLibs directories
- Run Gradle to build the APK
§Returns
Ok(BuildResult)containing the path to the built APKErr(BenchError)if the build fails
Auto Trait Implementations§
impl Freeze for AndroidBuilder
impl RefUnwindSafe for AndroidBuilder
impl Send for AndroidBuilder
impl Sync for AndroidBuilder
impl Unpin for AndroidBuilder
impl UnwindSafe for AndroidBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more