←back to thread

Java Hello World, LLVM Edition

(www.javaadvent.com)
200 points ingve | 1 comments | | HN request time: 0s | source
Show context
namegulf ◴[] No.46184561[source]
Wondering the benefits and how is this different from using GraalVM to build native images?

For eg. we could use Spring + Graal VM and get the application into native binaries without worrying too much about the low level stuff.

What are we missing?

replies(2): >>46184665 #>>46186816 #
gavinray ◴[] No.46184665[source]
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(2): >>46185022 #>>46187548 #
1. namegulf ◴[] No.46187548[source]
Don't we have JNI for that?