logoalt Hacker News

gavinraylast Sunday at 8:08 PM2 repliesview on HN

This article specifically discusses calling external C ABI libraries via the FFM API.

GraalVM is for compiling JVM bytecode to native, architecture-specific binaries.

FFM is like "[DllImport]" in .NET, or "extern" definitions in other languages.

The article shows how to auto-generate JVM bindings from C headers, and then allocate managed memory + interact with externally linked libs via the FFM API passing along said managed memory.


Replies

fniephauslast Sunday at 8:50 PM

BTW: We (the GraalVM team) maintain a full-blown LLVM bitcode runtime that can be embedded in Spring or any other JVM application and compiled to native: https://github.com/oracle/graal/tree/master/sulong

show 1 reply
namegulflast Monday at 2:13 AM

Don't we have JNI for that?