Skip to content
Volker Berlin edited this page Jan 17, 2020 · 5 revisions

Q: Can I compile with JWebAssembly Swing or AWT applications?
A: No, you need to write a GUI via the DOM API from the JWebAssembly API project. In theory, anyone can write a library that implements support for Swing and / or AWT. However, but this is not recommended.

Q: How fast is the generated JWebAssembly code?
A: It is slower than if you compiled and run the same code with Java. WebAssembly does not currently have a JIT and JWebAssembly optimizations are small. In the first tests, the code was about 50% slower. However, this is not linear and has a large variance.

Q: Why should I use JWebAssembly?
A: In the end, you can only answer this yourself. Here are a few points:

  • It is open source.
  • WebAssembly will be an important technology in the future.
  • You are already familiar with Java.
  • With a source map you can debug your Java code in the browser.
  • You can run JUnit tests and debug it in your IDE (hopefully) in the future.
Clone this wiki locally