compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

How to use a third-party C++ library in a Compose Multiplatform project?

Open ijero opened this issue 1 year ago • 1 comments

I am an Android developer and I want to use a cross-platform library, https://github.com/bblanchon/pdfium-binaries, as a third-party dependency in my own project. I can use JNI to work with the Android *.so files. However, I'm not sure how to import the *.dylib files for the iOS platform or the *.wasm files for WebAssembly, where to place them in the project, and how to use them.

After generating a project template using https://kmp.jetbrains.com/, I'm not sure how to proceed. Are there any sample code examples that I can refer to?

ijero avatar Jun 13 '24 09:06 ijero

To my knowledge there's no sample project that demonstrates how it's done but actually Compose Multiplatform itself is relying on interopping with C++ in some aspects - take a look to https://github.com/JetBrains/skiko it's a good starting point to learn how this is done in a multiplatform project.

Schahen avatar Jun 14 '24 13:06 Schahen

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

okushnikov avatar Jul 14 '24 14:07 okushnikov