Hackers News

TeaVM — Release 0.11.0

New WebAssembly backend

This release is mostly driven by development of new WebAssembly backend.
Old WebAssembly backend exists for many years and works well, however, did not see any adoption.
The main reason is that it does not add significant advantages (like performance improvements),
but makes development experience much worse, i.e. does not allow to easily interact with browser JS APIs
and produces large binary files (times as large as JS).

With introduction of new WebAssembly GC proposal these problems were solved.
However, this is not just small addition to original WebAssembly spec, but a game changer,
it was impossible just to improve existing backend to support new proposal.
So the decision was made to create a brand new WebAssembly backend, which would co-exist with the old one.
Perhaps, at some point old WebAssembly backend will be deprecated and fully removed,
but for now they will co-exist.
However, WebAssembly GC will be advertised as primary WebAssembly target
and the documentation will be maintained for WebAssembly GC, not for old WebAssembly.

New WebAssembly GC is a bit limited compared to JS backend, but mostly provides all features available
in old WebAssembly backend. Moreover, WebAssembly GC fully supports JSO, as Java-to-JS interaction API.
Hopefully, the next release will cover remaining features and WebAssembly GC backend will be on par with
JS backend and the “experimental” tag will be removed from WebAssembly support.

Java class library emulation

  • Fixed bugs in BitSet implementation
  • Add ceilDiv, ceilDivExact, ceilMod, floorDivExact, absExact to Math class.

Support for JS APIs

Other stuff

  • Long emulation was removed from JS runtime. Now JS only relies on
    BigInt,
    which is supported by all browsers for more than 4 years.

Sponsorship

Worth mentioning that TeaVM evolved with the support from its sponsors.
If you like this project, you can start donating.

Special thanks to @reportmill and @shannah, our permanent sponsors!

Contributors

Special thanks to @Ihromant, @lax1dude
and xpenatan, who were early adopters of WebAssembly GC backend
and helped to find some bugs there. Also, I want to highlight @lax1dude,
who not only enabled WebAssembly GC in his project, bug managed to identify, fix and successfully
sent his PR to main repository.

admin

The realistic wildlife fine art paintings and prints of Jacquie Vaux begin with a deep appreciation of wildlife and the environment. Jacquie Vaux grew up in the Pacific Northwest, soon developed an appreciation for nature by observing the native wildlife of the area. Encouraged by her grandmother, she began painting the creatures she loves and has continued for the past four decades. Now a resident of Ft. Collins, CO she is an avid hiker, but always carries her camera, and is ready to capture a nature or wildlife image, to use as a reference for her fine art paintings.

Related Articles

Leave a Reply