anistark / anistark/wasmhub

feat: add Java WASM runtime

Aperta
#10 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement help wanted
Lingua principale
JavaScript
Stelle
0
Fork
0
Merge medio
15h 10m
PR unite (30g)
3

Descrizione

## Overview

Add a Java runtime built to WASI Preview 1, following the same pattern as Rust and Go runtimes.

## Toolchain options to evaluate

| Tool | WASI | Notes |
|------|------|-------|
| **TeaVM** | Yes (experimental) | Most viable; Maven/Gradle plugin available |
| **GraalVM native-image** | Partial | Experimental WASM backend; large binaries |
| **JWebAssembly** | No | Browser target only; likely unsuitable |
| **Chicory** | N/A | WASM runtime written in Java, not a compiler |

Recommend prototyping with TeaVM first.

## Minimum setup required

- JDK 21+
- Chosen toolchain installed (e.g. TeaVM CLI, or GraalVM with WASM component)
- `wasm-opt` (Binaryen) for optimization
- `wasmrun` to verify the output binary
- Docker (to validate the full build inside the CI environment)

## Acceptance criteria

- [ ] `wasmhub get java` downloads and caches correctly
- [ ] `verify-binary.sh` passes on the output `.wasm`
- [ ] `wasmrun java-21.wasm version` returns expected output
- [ ] CI matrix job passes end-to-end
- [ ] `README.md` updated with Java in supported languages

## Open questions

- Maven or Gradle for the runtime project?
- Acceptable binary size ceiling? (TeaVM output can be 500KB–2MB vs ~77KB for Rust)

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.