The End of JNI Pain: How WebAssembly Is Quietly Replacing Native Libraries in Java (#98)

Episode 98 of the Foojay Podcast. All info, show notes, and links are available at https://foojay.io/today/category/podc.... WebAssembly is already running inside Java applications — most developers just don't know it yet. Andrea Peruffo explains how WebAssembly is becoming the modern, safe alternative to JNI: run Rust, C, and other native libraries directly on the JVM, without crash risks, per-platform packaging headaches, or losing all your observability. From JRuby's Prism parser to SQLite and Postgres running as pure Java bytecode, the use cases are real and ready. Guest Andrea Peruffo GitHub https://github.com/andreaTP/ LinkedIn   / andrea-peruffo-32269178   Bluesky https://bsky.app/profile/andreatp.bsk... Links https://foojay.io/today/a-new-generat... https://github.com/dylibso/chicory https://github.com/bytecodealliance/e... https://endive.run/docs/ https://bytecodealliance.org https://openjdk.org/projects/detroit/ Content 00:00 Introduction of topic and guests 00:56 What is WebAssembly? 03:35 Comparing the performance with JavaScript 05:45 JRuby already uses WebAssembly 09:04 JNI versus FFM API versus WebAssembly 13:58 Other Java-related tools that use WebAssembly 17:56 History of the Chicory and Endive projects to bring WebAssembly to Java 21:03 Projects of the Bytecode Alliance 22:02 The Endive project as the glue to bring WebAssembly tools to Java 23:30 Integration of the Redline compiler 28:59 Why this is the perfect solution to modernize existing Java applications 31:18 Is this approach performant? 32:24 What future changes in Java and the JVM will make this even better 35:04 How Endive can be used in AI development 37:28 What to expect in Endive 41:29 Conclusions