Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Glad you asked! We have an FFI framework (https://skip.tools/docs/modules/skip-ffi/) that enables you to use the same native code on both iOS and Android. I wrote a blog post about it at: https://skip.tools/blog/sharing-c-between-swift-and-kotlin/ . It is what powers some of our own frameworks like SkipSQL (https://skip.tools/docs/modules/skip-sql/).

On the Swift/iOS side, it simply uses Swift's excellent C integration; on the Java/Android side, it uses the venerable JNA library to handle loading and calling into embedded native libraries.



Will this work seemlesly with C only or C++ as well? I know swift this days have good c++ interop but not sure about jni/jna


You are correct that JNA's C++ integration – while possible – is not exactly seamless. It is an area that we are actively researching better solutions for.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: