paritytech / paritytech/host-rust-core
Fold truapi-platform into truapi-server::platform
@pgherveou is already working on this.
Since Sep 17, 2026.
- Dominant language
- Swift
- Stars
- 10
- Forks
- 3
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 148
Description
Fold truapi-platform into a public platform module in truapi-server while preserving the platform interfaces and permission behavior.
The shared permission enums currently live in truapi-platform, while native callbacks live in truapi-server. UniFFI generates separate Kotlin buffer types for these crates, requiring duplicate NativePermissionDecision and NativeDevicePermissionStatus enums. Sharing the server namespace would remove this workaround while keeping the code organized in a module.
- Move
truapi-platformintotruapi-server::platformand remove the standalone crate. - Consolidate UniFFI scaffolding into the server namespace, preserving native/WASM configuration.
- Remove the duplicate permission enums and their Rust, Swift and Kotlin conversions.
- Update CLI/provider imports, Cargo dependencies, code generation and build tooling references; regenerate native bindings.
- Verify permission behavior and generated bindings, and check standalone provider builds on native and WASM targets.
Tradeoff to check: truapi-provider currently depends only on the platform interfaces. It would acquire the server's runtime, signing and crypto dependencies. Measure the build and artifact impact. There is no current dependency cycle because the server does not depend on the provider; the CLI already depends on the server.
Follow-up cleanup to #827; keep it separate from the network/permissions changes.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.