Project Sulong: an LLVM bitcode interpreter on the Graal VM
summary
Project Sulong runs LLVM IR on the Graal VM via Truffle and the Graal compiler, interpreting LLVM bitcode interpreter and compiling hot functions to machine code; native allocations live on the native heap via the Unsafe API but calling C from JavaScript yields microbenchmarks ~10 ms native vs ~50 ms JavaScript and the combined JS+C path approaches native. Existing Ruby C extensions and OpenSSL run and a pixel-bench shows three times faster than MRI due to cross-language inlining. Work-in-progress adds Java-object “fat pointers” for memory-safe native execution; current limits: no setjmp/longjmp and no fork.
AI-written summary · about
chapters (16)
- 0:00Introduction
- 0:22The world is polyglot
- 3:06The idea behind Graal
- 4:26What is Sulong
- 20:16C extension API
- 24:21Inlining
- 24:57Performance measurements
- 26:05Running C extensions
- 28:55Other native interfaces
- 29:18Execution of native code
- 29:39Sulong allocation
- 32:55Conclusion
- 34:41Questions
- 37:34Calling conventions
- 39:41Throwing exceptions
- 41:16Memory safety
related talks
52mPolyglot on the JVM with Graal: One VM for Java, node.js, Ruby, R, and C++!
50mOne VM to Rule Them All
47mPolyglot Done Right with GraalVM
51mOne VM to Rule Them All? Lessons Learned with Truffle and Graal
37mGraalVM for Polyglots: Harder, Better, Faster, Stronger?
01h 19mTowards the tower of Babel: a Polyglot Language VM in Java
54mDeveloper's Introduction to GraalVM
20mGraalVM: Run Programs Faster Anywhere
