Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
ddf0786
feat(core): implement ring-vrf signing
pgherveou Jul 17, 2026
d59fdb1
Merge branch 'main' into feat/signing-host-ring-vrf
pgherveou Jul 20, 2026
5911457
Merge branch 'main' into feat/signing-host-ring-vrf
pgherveou Jul 21, 2026
01513f9
update
pgherveou Jul 23, 2026
bc2a5fe
analyse and fix diff with ~/github/polkadot-app-android-v2/
pgherveou Jul 23, 2026
1aed8f4
fixup
pgherveou Jul 23, 2026
5489b13
fixes
pgherveou Jul 23, 2026
132f667
fix(core): align host compatibility
pgherveou Jul 23, 2026
7c96e27
Merge main into feat/signing-host-ring-vrf
pgherveou Jul 23, 2026
5dd8ef1
ci: refresh generated fixture and licenses
pgherveou Jul 23, 2026
6868f0b
fix(sso-responder): bound the replay-dedup set to cap memory
TarikGul Jul 24, 2026
f7999e3
chore(codegen): refresh stale host-callbacks golden
TarikGul Jul 24, 2026
eaaa22b
fix(signing-host): name the beneficiary product in the allocation review
TarikGul Jul 24, 2026
d8168ad
chore(codegen): refresh host-callbacks golden for ResourceAllocationR…
TarikGul Jul 24, 2026
0bed52d
fix(signing-host): use a dedicated review for statement-store proof s…
TarikGul Jul 24, 2026
16009a1
Clippy / fmt
TarikGul Jul 24, 2026
a4e8e40
Merge branch 'feat/signing-host-ring-vrf' of github.com:paritytech/tr…
TarikGul Jul 24, 2026
103431c
fix(server): align runtime SCALE codecs
pgherveou Jul 23, 2026
0e7e96e
update
pgherveou Jul 24, 2026
8e3b2e4
feat(android): host adapter package + Kotlin/Android build tooling
TarikGul Jul 17, 2026
51d9568
add local android env to gitignore
TarikGul Jul 17, 2026
d2d886a
fix(android): correct JitPack/publish docs and publish target
TarikGul Jul 17, 2026
b7f400b
chore(android): vendor polkadot-app-android-v2 as hosts/android submo…
TarikGul Jul 19, 2026
f9baf3b
chore(android): bump hosts/android to the functional host bridge
TarikGul Jul 19, 2026
1b1efad
chore(android): bump hosts/android + add shell drift check
TarikGul Jul 19, 2026
8c2ba3e
chore(android): bump hosts/android to the chain-race fix
TarikGul Jul 19, 2026
1c73b49
fix(android): address host-adapter review — codegen, lint, equals, docs
TarikGul Jul 23, 2026
41e9c34
chore(android): bump hosts/android to the equals-contract fix
TarikGul Jul 25, 2026
3febb3a
Merge branch main into tg/truapi-rust-core
TarikGul Jul 29, 2026
90c3995
docs(android): correct the blocking-pool list in the host README
TarikGul Jul 29, 2026
4d51bb1
docs(android): sync the host bridge KDoc and bump the app pin
TarikGul Jul 29, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,12 @@ playground/public/static.files
# Auto-generated by truapi-codegen (typecheck fixtures for rustdoc ts blocks)
playground/test/generated/

# Local Android toolchain env (machine-specific JDK/SDK/NDK paths)
.android-env

# Auto-generated FFI / WASM binding outputs
android/truapi-host/src/main/kotlin/generated/
android/truapi-host/src/main/jniLibs/
ios/truapi-host/Sources/TrUAPIHost/truapi_server.swift
ios/truapi-host/Sources/truapi_serverFFI/
rust/crates/truapi-server/pkg/
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@
path = hosts/ios
url = https://github.com/paritytech/polkadot-app-ios-v2
branch = codex/truapi-rust-core
[submodule "hosts/android"]
path = hosts/android
url = https://github.com/paritytech/polkadot-app-android-v2
branch = tg/truapi-rust-core
8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,11 @@ codegen-units = 1
panic = "abort"
strip = "symbols"
debug = false

# UniFFI binding generation scans the host cdylib's exported metadata symbols.
# `release` strips them (`strip = "symbols"`), so uniffi-bindgen finds nothing
# and emits no bindings. This profile inherits release but keeps symbols, and is
# used by the `uniffi` / `uniffi-kotlin` make targets for the codegen build only.
[profile.codegen]
inherits = "release"
strip = false
52 changes: 47 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Run `make help` for the list of targets.

.DEFAULT_GOAL := help
.PHONY: help setup build codegen test check clean playground wasm wasm-crypto-test uniffi dotli-link dev dev-bootstrap dev-link-check e2e-dotli matrix explorer
.PHONY: help setup build codegen test check clean playground wasm wasm-crypto-test uniffi uniffi-kotlin android-jni android-publish-local check-android-parity dotli-link dev dev-bootstrap dev-link-check e2e-dotli headless install matrix explorer

CARGO ?= cargo
TRUAPI_PKG := js/packages/truapi
Expand Down Expand Up @@ -66,7 +66,12 @@ wasm: ## Rebuild the truapi-server WASM artifacts under js/packages/truapi-host/
wasm-crypto-test: ## Run crypto/vector tests on wasm32 via wasm-pack/node.
wasm-pack test --node rust/crates/truapi-server --test wasm_crypto_vectors --no-default-features

UNIFFI_CDYLIB_DIR := target/release
dotli-link: ## Link dotli to this checkout's local @parity/truapi packages.
cd $(DOTLI) && TRUAPI_REPO="$(CURDIR)" bun run link:truapi

# uniffi-bindgen scans the cdylib's metadata symbols, which `release` strips, so
# codegen builds use the unstripped `codegen` profile (see [profile.codegen]).
UNIFFI_CDYLIB_DIR := target/codegen
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Darwin)
UNIFFI_CDYLIB := $(UNIFFI_CDYLIB_DIR)/libtruapi_server.dylib
Expand All @@ -77,7 +82,7 @@ endif
UNIFFI_SWIFT_TMP := target/uniffi-swift-out

uniffi: ## Regenerate Swift bindings from truapi-server cdylib.
$(CARGO) build -p truapi-server --release --features ws-bridge
$(CARGO) build -p truapi-server --profile codegen --features ws-bridge
rm -rf $(UNIFFI_SWIFT_TMP)
mkdir -p $(UNIFFI_SWIFT_TMP)
$(CARGO) run -p uniffi-bindgen-cli -- generate \
Expand All @@ -92,8 +97,30 @@ uniffi: ## Regenerate Swift bindings from truapi-server cdylib.
cp $(UNIFFI_SWIFT_TMP)/truapi_serverFFI.modulemap \
ios/truapi-host/Sources/truapi_serverFFI/include/module.modulemap

dotli-link: ## Link dotli to this checkout's local @parity/truapi packages.
cd $(DOTLI) && TRUAPI_REPO="$(CURDIR)" bun run link:truapi
UNIFFI_KOTLIN_OUT := android/truapi-host/src/main/kotlin/generated

uniffi-kotlin: ## Regenerate Kotlin UniFFI bindings from the truapi-server cdylib.
$(CARGO) build -p truapi-server --profile codegen --features ws-bridge
rm -rf $(UNIFFI_KOTLIN_OUT)
mkdir -p $(UNIFFI_KOTLIN_OUT)
$(CARGO) run -p uniffi-bindgen-cli -- generate \
--library $(UNIFFI_CDYLIB) \
--language kotlin \
--out-dir $(UNIFFI_KOTLIN_OUT)

# Android ABIs to cross-compile the cdylib for. arm64 + armv7 cover physical
# devices; x86_64 covers the emulator on Intel/Apple-silicon hosts.
ANDROID_ABIS ?= arm64-v8a armeabi-v7a x86_64
ANDROID_JNILIBS := android/truapi-host/src/main/jniLibs

android-jni: ## Cross-compile libtruapi_server.so for Android ABIs into jniLibs (needs cargo-ndk + NDK).
@command -v cargo-ndk >/dev/null || { echo "cargo-ndk not found: cargo install cargo-ndk"; exit 1; }
$(CARGO) ndk $(foreach abi,$(ANDROID_ABIS),-t $(abi)) \
-o $(ANDROID_JNILIBS) \
build --release -p truapi-server --features ws-bridge

android-publish-local: uniffi-kotlin ## Generate Kotlin bindings, then publish the AAR to ~/.m2 (needs Gradle + JDK 17). The AAR does not bundle the cdylib; consumers build it per ABI (see android-jni).
gradle :truapi-host:publishReleasePublicationToMavenLocal

test: ## Run Rust + TypeScript client tests.
cargo test --workspace
Expand All @@ -110,6 +137,21 @@ check: ## Full verification suite (build, fmt, clippy, test, TS tests, playgroun
cd $(JS_PACKAGES)/truapi-host && npm install --no-fund --no-audit && npm test
cd $(PLAYGROUND) && yarn build && yarn lint

ANDROID_SHELL := android/truapi-host/src/main/kotlin/io/parity/truapi/TrUAPIHost.kt
ANDROID_SHELL_VENDORED := hosts/android/bindings/truapi-host/src/main/kotlin/io/parity/truapi/TrUAPIHost.kt

check-android-parity: ## Verify the canonical android/truapi-host shell matches the copy vendored in the app (hosts/android). Skips if the submodule is not initialized.
@if [ ! -f "$(ANDROID_SHELL_VENDORED)" ]; then \
echo "Skipping android parity check: hosts/android not initialized (run 'git submodule update --init hosts/android')."; \
elif diff -q "$(ANDROID_SHELL)" "$(ANDROID_SHELL_VENDORED)" >/dev/null; then \
echo "android/truapi-host shell matches the vendored app copy."; \
else \
echo "ERROR: $(ANDROID_SHELL) has drifted from $(ANDROID_SHELL_VENDORED)."; \
echo "The host adapter shell is duplicated in truapi and the app; keep them in sync."; \
diff "$(ANDROID_SHELL)" "$(ANDROID_SHELL_VENDORED)" || true; \
exit 1; \
fi

clean: ## Remove local build/test artifacts without deleting dependencies.
cargo clean
rm -rf \
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,12 @@ js/packages/
truapi-host/ @parity/truapi-host: WASM-backed host runtime; entries `.`
(shared host types), `/web` (iframe + Web Worker),
`/worker-runtime`
ios/truapi-host/ Swift host adapter package over the truapi-server UniFFI core
android/truapi-host/ Kotlin host adapter package over the truapi-server UniFFI core
playground/ Interactive Next.js playground (truapi-playground.dot)
hosts/dotli/ dotli host, vendored as a submodule
hosts/ios/ polkadot-app-ios-v2, vendored as a submodule (build/test against the core)
hosts/android/ polkadot-app-android-v2, vendored as a submodule (build/test against the core)
docs/ Design docs, RFCs, feature proposals
scripts/codegen.sh Regenerate the TS client from the Rust source
```
Expand Down
5 changes: 5 additions & 0 deletions android/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.gradle/
build/
local.properties
*.iml
.idea/
Loading