holochain / holochain/android-service-runtime

Switch back to upstream uniffi crate -- Refactor ffi libraries architecture to client + service libs

Open
#113 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4
Forks
2
Avg merge
1d 5h
Merged PRs (30d)
3

Description

Currently we have 2 ffi libraries:
- a "types" library which contains the input / output used in both the client kotlin lib and service kotlin lib.
- a "service" library which contains the actual kotlin service, and relies on the "types" library.

To facilitate this, we forked uniffi-rs for this change: https://github.com/mozilla/uniffi-rs/commit/0adf6f4a2f2173ea7c1b9d52461af3247162b77f

After some conversation with the uniffi team (https://github.com/mozilla/uniffi-rs/pull/2480), I learned this is not the recommended approach. Instead they recommend having 3 crates: types, client and service, where both client and service import the types crate. Then build ffi libraries for just the client and service.

Currently the tauri-plugin-service imports both the client and service library. After making this change, that would cause duplicate type definitions. We may need to instead copy the necessary client logic into the service library, or else extract it into a common shared library.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.