PanamaPort is a library implementing the Foreign Function & Memory API for Android 8.0+ (API level 26)
This project contains 4 sublibraries:
Using versions lower than those listed may cause compilation and runtime issues. Older versions of R8/D8 have known bugs that prevent the library from working properly
Just add this library to the list of dependencies:
dependencies {
implementation 'io.github.vova7878.panama:Core:<version>'
}
PanamaPort implements full Foreign Function & Memory API support, including:
All non-standard apis added to the port are marked with @PortAPI annotation
This includes just useful methods:
MemoryLayout.valueLayout(Class<?>, ByteOrder)MemoryLayout.sequenceLayout(MemoryLayout)MemoryLayout.paddedStructLayout(MemoryLayout...)MemorySegment.nativeAddress()Android-specific linker options:
Option.allowExceptions() and Option.JNIEnvArg(int)Port of methods outside the java.lang.foreign package:
FileChannelUtils.map(FileChannel, MapMode, long, long, Arena)Usually, to use the output of jextract, it is enough to fix package names. If something doesn't work properly, please create an issue
Examples are available in this repository. The same repository is where tests are ported from the OpenJ9 and Hotspot implementations
1,007 commits
Java
100.0%
PanamaPort is a library implementing the Foreign Function & Memory API for Android 8.0+ (API level 26)
This project contains 4 sublibraries:
Using versions lower than those listed may cause compilation and runtime issues. Older versions of R8/D8 have known bugs that prevent the library from working properly
Just add this library to the list of dependencies:
dependencies {
implementation 'io.github.vova7878.panama:Core:<version>'
}
PanamaPort implements full Foreign Function & Memory API support, including:
All non-standard apis added to the port are marked with @PortAPI annotation
This includes just useful methods:
MemoryLayout.valueLayout(Class<?>, ByteOrder)MemoryLayout.sequenceLayout(MemoryLayout)MemoryLayout.paddedStructLayout(MemoryLayout...)MemorySegment.nativeAddress()Android-specific linker options:
Option.allowExceptions() and Option.JNIEnvArg(int)Port of methods outside the java.lang.foreign package:
FileChannelUtils.map(FileChannel, MapMode, long, long, Arena)Usually, to use the output of jextract, it is enough to fix package names. If something doesn't work properly, please create an issue
Examples are available in this repository. The same repository is where tests are ported from the OpenJ9 and Hotspot implementations
1,007 commits
Java
100.0%