You can now define a rust_mobile_library target in the Starlark prelude to share a single Rust library across both Apple and Android targets. Apple consumers build the staticlib variant and Android consumers build the cdylib variant, only when each platform collects native dependencies. Android-only projects no longer need to pull in Apple Rust targets, and Apple-only projects no longer need the Android linker. The bundled mobile examples and docs have been updated to show this. Note: rust_mobile_library does not yet support Rust dependencies.
Hive
Add a rust_mobile_library target shared across Apple and Android
Published
Jun 29, 2026 · 16:02 UTC
Repository
tuist/once