Felix Deimel
Felix Deimel
@gabriel-kozma I recently created some manual Kotlin/JNA bindings for a C API that includes function pointers. Here's the C definition: https://github.com/royalapplications/royalvnc/blob/17a022cc68586c802a3e4dc0937a947a54e6610c/Sources/RoyalVNCKitC/include/RoyalVNCKitC.h#L76 And here's the Kotlin binding: https://github.com/royalapplications/royalvnc/blob/17a022cc68586c802a3e4dc0937a947a54e6610c/Bindings/kotlin/RoyalVNCAndroidTest/app/src/main/java/com/royalapps/royalvnc/RoyalVNCKit.kt#L141 Hope that helps!
@gabriel-kozma So let me start by sharing a "trick" that is helpful during development of the generator. There's a sample project in the repository under `Samples/Beyond.NET.Sample.Managed`. You can build this...
@gabriel-kozma I think you'll like [this one](https://github.com/royalapplications/beyondnet/commit/ea47ff7dc5da1c883e391f62d1f933f83bf38277). ;)
@gabriel-kozma Oh, cool! Do you automatically build the .so and a .jar that can be integrated into an Android project without having to reference the generated Kotlin bindings file or...
NOTE: Targeting Android 15 does not work at the moment because JNA hasn't yet added support for 16 KB page size on Android. See https://github.com/java-native-access/jna/issues/1618 Using the Android 14 SDK...
@eiabea Yup, forgot to document this but you need to increase the max file size of Android Studio/IntelliJ: https://stackoverflow.com/a/23058324/1025706 Btw I think I increased it to something like 500MB and...
@eiabea FYI: Ultimately (once the code generator reaches a certain level) I would like to add automatic build support just like what we have for Swift already. So that instead...
@eiabea Really?! The file isn't that huge so maybe try something like 50MB?
@eiabea I just checked. On my MacBook Air M2 I set it to `999999` (KB) so roughly 1GB and have no issues whatsoever. Since the actual file is only around...
@eiabea After updating to .NET 9 RC1 and recompiling the generator, don't forget to update your symlink to beyondnetgen.