Skip to main content

Crate rustferry_android

Crate rustferry_android 

Source
Expand description

Direct Android SDK/NDK build, signing, and artifact validation.

The pipeline intentionally does not invoke Gradle or require a device. It builds a Rust cdylib, consumes Cargo JSON build-script outputs, links resources with AAPT2, merges DEX with D8, injects stored native libraries, aligns to 16 KiB, signs, and validates the result.

Structs§

AndroidBuildArtifact
Verified signed APK metadata.
AndroidBuildPaths
All deterministic output paths for one build fingerprint.
AndroidBuildPlan
Executable direct Android plan.
AndroidBuildRequest
Complete direct Android build request.
AndroidBuildTools
One Android SDK Build Tools installation.
AndroidDiscovery
Complete read-only inventory of Android toolchain candidates.
AndroidHostTools
Optional host and SDK helper executables found during discovery.
AndroidNdk
One Android NDK installation and its LLVM host toolchain.
AndroidPlanStep
One human/JSON-friendly dry-run step.
AndroidPlatform
One installed Android SDK platform.
AndroidToolchain
Selected tools used by one direct Android build.
ApkExpectation
Independent expectations for the final APK archive.
ApkValidation
Evidence returned by independent APK inspection.
CargoBuildArtifacts
Native and JVM artifacts extracted from one Cargo JSON message stream.
CommandOutput
Captured output from a successful external command.
CommandSpec
One safely tokenized external command.
DebugSigningPaths
Machine-local files backing the persistent debug signer.
DiscoveryOptions
Explicit discovery inputs. Default reads only conventional path environment variables.
DoctorCheck
One stable, machine-readable Android doctor finding.
DoctorOptions
Android doctor inputs.
DoctorReport
Complete Android doctor report. Generating it never installs or changes tools.
GeneratedAndroidContent
Deterministic Android manifest and resource source files.
GeneratedAndroidFiles
Paths written for AAPT2 consumption.
ManifestValidation
Stable evidence extracted from the final APK’s compiled binary manifest.
NativeLibraryInput
Native library produced for one configured ABI.
ResolvedSigningConfig
Fully resolved signing parameters; password values are never stored here.

Enums§

AndroidBuildOutcome
Result of build orchestration.
AndroidBuildProfile
Cargo profile used for the native build and manifest debuggability.
AndroidError
Failure while discovering, building, signing, or validating an Android artifact.
AndroidPlanStepKind
Stable kind for a dry-run build operation.
AndroidSigningConfig
APK signing selection.
DexPolicy
Whether the application intentionally contains JVM DEX code.
DoctorStatus
Severity and result of one doctor check.
SigningPasswordSource
Non-inline password source accepted by Android signing tools.

Constants§

ACTIVITY_CLASS
Generated launcher activity and private Rust bridge entry point.
BRIDGE_CLASS
Generated Java dispatcher invoked through the activity.
DEBUG_KEY_ALIAS
Alias used only by the machine-local debug certificate.
DEFAULT_COMMAND_TIMEOUT
Default deadline for one external build-tool invocation.
FILE_PROVIDER_CLASS
Generated read-only provider for application-owned share files.
NOTIFICATION_RECEIVER_CLASS
Generated alarm and notification-action receiver.
WIDGET_PROVIDER_CLASS
Generated Android home-screen widget provider.

Functions§

apksigner_sign_command
Build the apksigner sign command without exposing a password value.
apksigner_verify_command
Build the mandatory signature verification command.
build_android
Discover tools, create a plan, and either return it or execute the complete pipeline.
cargo_build_command
Create a Cargo cross-build command using explicit target/linker arguments.
collect_cargo_artifacts
Parse Cargo JSON, constrain reported paths to Cargo’s target directory, and collect DEX files.
collect_d8_outputs
Collect and validate sequential D8 output names from a directory.
collect_explicit_dex_inputs
Recursively collect explicit bridge DEX/JAR inputs without following symlinks.
default_debug_signing_paths
Resolve paths in cargo-ferry’s OS configuration directory without creating files.
discover_android
Inspect configured and conventional Android SDK/NDK locations without changing the system.
doctor_android
Inspect the host for every direct Android pipeline prerequisite.
generate_android_content
Create manifest and resource source text without filesystem access.
inject_apk_entries
Append stored native libraries and DEX files to an AAPT2-linked APK.
plan_android_build
Build a side-effect-free direct Android execution plan from a selected toolchain.
preview_signing_config
Resolve signing paths and password references without reading or creating signing files.
resolve_signing_config
Resolve a signing configuration, creating and validating the debug key when needed.
run_command
Run one command, capture both streams without pipe deadlock, and save a redacted log.
validate_aapt2_badging
Parse and verify aapt2 dump badging package and launcher metadata.
validate_aapt2_manifest
Verify SDK levels, permissions, components, and deep-link filters from AAPT2 XML output.
validate_apk_archive
Validate ZIP safety, resources, DEX headers, and ELF ABI headers without trusting build tools.
write_android_content
Write generated content below a fingerprinted output directory.