5 ms·
Show HN: Webassembly4J Run WebAssembly from Java
I’ve released WebAssembly4J, along with two runtime bindings:
Wasmtime4J – Java bindings for Wasmtime http://github.com/tegmentum/wasmtime4j http://github.com/tegmentum/wasmtime4j
WAMR4J – Java bindings for WebAssembly Micro Runtime http://github.com/tegmentum/wasmr4j http://github.com/tegmentum/wasmr4j
WebAssembly4J – a unified Java API that allows running WebAssembly across different engines
http://github.com/tegmentum/webassembly4j 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.