You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 991f2d1
Browse filesBrowse the repository at this point in the historyBrowse files
Attach the WebAssembly module to the GitHub release
A wasm job in release.yml builds the module on Oracle GraalVM 25.0.4,
with Binaryen version_133 for wasm-opt and Node 24 for the tests, runs
wasmTest and hands open-java-format-wasm-<version>.zip to the draft
GitHub release, which takes it from -PwasmModule=<dir> as it takes the
binaries from -PnativeImages=<dir>, signed and in the checksums like
every other file there.
Only github-release waits for the job. Maven Central does not carry
the module, so a failed build holds back nothing else, and "Re-run
failed jobs" builds it again and opens the draft. Nothing in ci.yml
builds it: few people will use it, and a pull request is not worth
its minutes.
The Oracle GraalVM version is pinned to the patch, because Web Image
is experimental and changes between releases. setup-node runs without
its cache, which a release must not restore.
Copy file name to clipboardExpand all lines: README.md
+18-1Lines changed: 18 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ and published from this repository.
23
23
|[Maven Central](https://central.sonatype.com/namespace/dev.openjavaformat)|`dev.openjavaformat:open-java-format`, with `-spi`, `-native` and `-jdk-bootstrap`, and the Maven plugin `dev.openjavaformat:fmt-maven-plugin` from [its own repository](https://github.com/openjavaformat/fmt-maven-plugin)|
|[JetBrains Marketplace](https://plugins.jetbrains.com/plugin/34359-open-java-format)| the IntelliJ IDEA plugin |
26
-
|[GitHub Releases](https://github.com/openjavaformat/open-java-format/releases/latest)| native binaries, a runnable jar, the Gradle, IntelliJ and Eclipse plugins, every file signed |
26
+
|[GitHub Releases](https://github.com/openjavaformat/open-java-format/releases/latest)| native binaries, a runnable jar, the Gradle, IntelliJ and Eclipse plugins, the WebAssembly module of [the playground](https://openjavaformat.dev/playground/), every file signed |
27
27
28
28
Why the project exists is in the [manifesto](https://openjavaformat.dev/manifesto/).
29
29
@@ -161,6 +161,23 @@ GraalVM has to come from outside Gradle: unpacking a JDK that Gradle downloaded
161
161
preserve the symlink GraalVM ships at `bin/native-image`, and `nativeCompile` then fails on an empty,
162
162
unexecutable file.
163
163
164
+
### WebAssembly module
165
+
166
+
The playground on openjavaformat.dev runs the formatter in the browser, compiled to WebAssembly by
167
+
GraalVM's Web Image backend. Only the release workflow builds it, in its `wasm` job, and the zip goes
168
+
on the GitHub release; `./gradlew build` leaves it out. Web Image ships in Oracle GraalVM only, so the
169
+
module needs Oracle GraalVM 25 behind `GRAALVM_HOME`, Binaryen 119 or later (`wasm-opt`) on the
170
+
`PATH`, and Node.js 24 or later for the tests:
171
+
172
+
```bash
173
+
./gradlew -Pwasm=true :open-java-format-wasm:wasmTest # build, then test in Node against the runnable jar
174
+
./gradlew -Pwasm=true :open-java-format-wasm:wasmDev # a bare page next to the module, to try it
0 commit comments