Skip to content

Publish an Android host artifact (io.parity:truapi-host AAR) #328

Description

@valentinfernandez1

Problem

The Polkadot Android app is being migrated to use the Truapi core. The android app needs to embed the TrUAPI Rust core, but truapi does not publish an Android artifact. The app has to build the core from a truapi source checkout, which requires a Rust toolchain and the NDK in every app dev setup and CI run. truapi should publish a versioned artifact the app can consume as a normal Gradle dependency.

What a release needs to ship

An AAR (io.parity:truapi-host:<version>) containing three things, built from the same source:

  1. libtruapi_server.so for the four Android ABIs (arm64-v8a, armeabi-v7a, x86, x86_64), built with the ws-bridge feature
  2. the UniFFI Kotlin bindings, generated from that same build. Bindgen reads a host-native cdylib built with the codegen profile, since the release profile strips the metadata it scans
  3. the Kotlin shell (TrUAPIHost.kt: HostBridge, TrUAPIHostCore, LocalhostBridgeBootstrap, storage interfaces)

JNA is the only runtime dependency. Java 17 target.

Tasks

  • Give the Android host module (shell + Gradle module) a canonical home on main
  • Add a release workflow that builds and publishes the AAR
  • Add a review-fixtures generator: a dev binary or test that prints canonical SCALE hex for each UserConfirmationReview variant, so embedders can regenerate their decoder fixtures against each release. Ideally it also runs in CI, so reordering a variant fails here instead of in a host app later.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions