Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotlin Multiplatform support #441

Closed
ShadowJonathan opened this issue May 9, 2021 · 7 comments
Closed

Kotlin Multiplatform support #441

ShadowJonathan opened this issue May 9, 2021 · 7 comments

Comments

@ShadowJonathan
Copy link

ShadowJonathan commented May 9, 2021

Heya, i'm looking at uniffi's support for Kotlin, and i'm seeing quite a few imports which make me wonder if it's possible to support KMP, Kotlin Multiplatform, to be able to bind variants of the same code onto multiple platforms.

Are there any plans for this, or would this even be remotely possible?

┆Issue is synchronized with this Jira Task
┆Issue Number: UNIFFI-56

@rfk
Copy link
Collaborator

rfk commented May 17, 2021

Hi @ShadowJonathan, thanks for reaching out! We don't have any particular plans to support KMP at the moment, but also I don't see any particular reason why we couldn't support it. I'm not very familiar with it though - if you know your way around using KMP a little bit, I'd welcome you trying out one of the small examples from this repo, seeing whether you can successfully integrate it into a KMP project, and letting us know how it works (and/or how it fails).

@benkuly
Copy link

benkuly commented Nov 14, 2022

+1 for Kotlin Multiplatform support. I'm a Kotlin Multiplatform dev and already did manual bindings for a c-library targeting JVM (using JNA), JS (using wasm) and Native on Kotlin (see also here). The problem: I never did something with Rust.

@benkuly
Copy link

benkuly commented Nov 26, 2022

The repository of Kotlin multiplatform bindings can be found here. I'm not sure if it should be put it into the main repo of uniffi-rs.

@benkuly
Copy link

benkuly commented Nov 27, 2022

I think JS bindings using WASM could be a bit more challenging, because I don't want to rebuild wasm-bindgen 🤔

@mhammond
Copy link
Member

I'm not sure if it should be put it into the main repo of uniffi-rs.

Thanks for you interest! I think we'd be mildly against taking a new binding in the repo as we'd really like to have better support for bindings being external to uniffi itself (eg, see #1241 and related issues, our JS binding for desktop JS already are external, and #1200 talks about moving Ruby out). OTOH though, I think we'd probably be OK if the change to the existing Kotlin bindings were relatively small and allowed those bindings to be used in more contexts. I don't have any idea how feasible that would be though - what are your thoughts?

@benkuly
Copy link

benkuly commented Nov 28, 2022

I think we should leave it as an external project. The changes are not that small and I also have made a lot of changes to how the tests are running. So it would take a lot of time to integrate it into the uniffi-rs repository.

@benkuly
Copy link

benkuly commented Nov 28, 2022

Maybe we could mention existing external bindings in the README instead?

Lonami added a commit to Lonami/uniffi-rs that referenced this issue Nov 29, 2022
badboy pushed a commit that referenced this issue Dec 20, 2022
@badboy badboy closed this as completed Jun 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants