Java Hello World, LLVM Edition
javaadvent.com·2d·
Discuss: Hacker News
🏭Compiler Backends
Preview
Report Post

After exploring Java bytecode in previous years (2022, 2023, 2024), this year we’ll take an unexpected detour for a Java advent: instead of generating Java bytecode, we’ll use Java to build and execute LLVM IR, the intermediate language behind compilers like clang.

Using Java’s Foreign Function & Memory (FFM) API, we’ll call the LLVM C API, generate a “Hello, World!” program, and even JIT-compile it to native co…

Similar Posts

Loading similar posts...