TeaVM is a Java bytecode transpiler and browser-based JVM runtime that converts compiled Java class files into JavaScript or WebAssembly. It functions as a compiler and build pipeline tool that enables applications written in various JVM languages to execute natively within a web browser.
The project distinguishes itself by transforming bytecode directly into optimized web formats without requiring the original source code. It includes a WebAssembly bytecode compiler for high-performance execution and a specialized emulation system to handle asynchronous multithreading within the single-threaded environment of a browser.
The toolchain incorporates static analysis for tree-shaking to reduce bundle size and generates source maps to link transpiled execution back to original source code for debugging. It provides programmatic compiler integration and mechanisms for interoperability between the virtual machine and native browser objects.