Back to browse
GitHub Repository

Java bindings for the Wasmtime WebAssembly runtime

4 starsJava

Webassembly4J Run WebAssembly from Java

by tegmentum·Mar 15, 2026·2 points·0 comments

AI Analysis

●●SolidNiche GemBig Brain

Unified WASM API with auto-switching Panama FFI for Java 23 plus legacy JNI support.

Strengths
  • Automatic runtime selection between Panama FFI and JNI based on Java version.
  • Unified abstraction layer lets you swap Wasmtime and WAMR without code changes.
  • Zero-boxing typed function calls reduce overhead for frequent wasm-java interactions.
Weaknesses
  • Java WebAssembly usage is niche compared to Node or Rust ecosystems generally.
  • Chicory offers a pure Java interpreter alternative without native dependency requirements.
Target Audience

Java developers integrating WebAssembly, enterprise backend teams

Similar To

Chicory · wasmtime-java

Post Description

I’ve released WebAssembly4J, along with two runtime bindings:

Wasmtime4J – Java bindings for Wasmtime http://github.com/tegmentum/wasmtime4j WAMR4J – Java bindings for WebAssembly Micro Runtime http://github.com/tegmentum/wasmr4j

WebAssembly4J – a unified Java API that allows running WebAssembly across different engines http://github.com/tegmentum/webassembly4j

The motivation was that Java currently has multiple emerging WebAssembly runtimes, but each exposes its own API. If you want to experiment with different engines, you have to rewrite the integration layer each time.

WebAssembly4J provides a single API while allowing different runtime providers underneath.

Goals of the project: Run WebAssembly from Java applications Allow cross-engine comparison of runtimes Make WebAssembly runtimes more accessible to Java developers Provide a stable interface while runtimes evolve

Currently supported engines: Wasmtime WAMR Chicory GraalWasm

To support both legacy and modern Java environments the project targets: Java 8 (JNI bindings) Java 11 Java 22+ (Panama support)

Artifacts are published to Maven Central so they can be added directly to existing projects.

I’d be very interested in feedback from people working on Java + WebAssembly integrations or runtime implementations.

Similar Projects

Developer Tools●●●Banger

BoltFFI a high performance Rust bindings generator

Zero-copy FFI approach cuts UniFFI overhead by 200–1000x; async maps to native patterns.

WizardryBig BrainZero to One
alihilal94
213mo ago