# konsoletyper/teavm

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/konsoletyper-teavm).**

2,997 stars · 304 forks · Java · apache-2.0

## Links

- GitHub: https://github.com/konsoletyper/teavm
- Homepage: https://teavm.org
- awesome-repositories: https://awesome-repositories.com/repository/konsoletyper-teavm.md

## Topics

`aot` `java` `javascript` `jvm` `webassembly`

## Description

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.

## Tags

### Programming Languages & Runtimes

- [Bytecode-to-JavaScript](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-transpilers/source-to-javascript-transpilers/bytecode-to-javascript.md) — Converts JVM class files into JavaScript source code by mapping bytecode instructions to equivalent high-level operations.
- [Browser-Based Runtimes](https://awesome-repositories.com/f/programming-languages-runtimes/browser-based-runtimes.md) — Provides an execution environment that runs Java applications natively in the browser by transpiling bytecode to web standards.
- [JavaScript Interoperability](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-interoperability.md) — Provides mechanisms for exchanging data and invoking functions between the JVM runtime and the native JavaScript environment. ([source](https://teavm.org/docs/intro/overview.html))
- [Source-to-JavaScript Transpilers](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-transpilers/source-to-javascript-transpilers.md) — Converts Java bytecode into JavaScript to run existing JVM applications natively within a web browser.
- [Java Bytecode Transpilation](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-transpilers/source-to-javascript-transpilers/java-bytecode-transpilation.md) — Converts compiled Java class files into JavaScript or WebAssembly for browser execution without requiring original source code. ([source](https://teavm.org/))
- [Bytecode Translators](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/webassembly/bytecode-translators.md) — Translates JVM bytecode into a WebAssembly binary format for near-native execution speed within the browser.
- [Concurrency Emulation](https://awesome-repositories.com/f/programming-languages-runtimes/concurrency-emulation.md) — Simulates concurrent execution by splitting tasks into discrete chunks to prevent blocking the browser main loop.
- [JavaScript Optimizers and Minifiers](https://awesome-repositories.com/f/programming-languages-runtimes/javascript-optimizers-and-minifiers.md) — Optimizes JavaScript output by removing unused code and simplifying variable usage to reduce bundle size. ([source](https://teavm.org/docs/intro/overview.html))
- [JVM-to-JavaScript Type Mappings](https://awesome-repositories.com/f/programming-languages-runtimes/jvm-to-javascript-type-mappings.md) — Maps Java types and object structures to JavaScript prototypes to preserve object-oriented behavior and memory layouts.
- [JVM Ecosystem](https://awesome-repositories.com/f/programming-languages-runtimes/programming-language-varieties/programming-languages/jvm-languages.md) — Compiles bytecode from various JVM source languages into executable formats that run directly within a web browser. ([source](https://teavm.org/))
- [WebAssembly Performance Optimizations](https://awesome-repositories.com/f/programming-languages-runtimes/webassembly-performance-optimizations.md) — Generates optimized WebAssembly or JavaScript from bytecode to improve execution speed and reduce bundle size.

### Development Tools & Productivity

- [JVM-to-Web](https://awesome-repositories.com/f/development-tools-productivity/java-bytecode-viewers/bytecode-converters/jvm-to-web.md) — Converts JVM bytecode into JavaScript or WebAssembly for execution in a web browser.
- [Transpilation Mapping](https://awesome-repositories.com/f/development-tools-productivity/source-code-mapping/plan-to-source-mapping/transpilation-mapping.md) — Generates source maps that link transpiled JavaScript execution back to the original Java source code for debugging. ([source](https://teavm.org/docs/intro/overview.html))
- [Source Map Generators](https://awesome-repositories.com/f/development-tools-productivity/source-map-generators.md) — Generates mapping files that link transpiled JavaScript output back to the original bytecode and source lines for debugging.

### Web Development

- [Client-Side Execution Environments](https://awesome-repositories.com/f/web-development/client-side-execution-environments.md) — Executes Java logic in the browser while maintaining the ability to call JavaScript functions and access browser objects.
- [JVM Web Frameworks](https://awesome-repositories.com/f/web-development/jvm-web-frameworks.md) — Runs applications written in various JVM languages on the web by compiling bytecode into browser-compatible formats.
- [WebAssembly Compilation](https://awesome-repositories.com/f/web-development/webassembly-compilation.md) — Transforms Java bytecode into WebAssembly to execute high-performance applications directly inside a web browser. ([source](https://teavm.org/gallery.html))
- [Build Automation Pipelines](https://awesome-repositories.com/f/web-development/front-end-development-workflows/build-automation-pipelines.md) — Provides a programmatic compiler for automating the transformation of bytecode into production-ready web assets.
- [Tree-Shaking Optimizations](https://awesome-repositories.com/f/web-development/tree-shaking-optimizations.md) — Removes unreachable code and unused classes by analyzing the call graph to minimize the final output size.

### Part of an Awesome List

- [Execution Emulations](https://awesome-repositories.com/f/awesome-lists/devops/concurrency-and-multithreading/execution-emulations.md) — Implements a specialized emulation system to simulate asynchronous multithreading within the browser's single-threaded main loop. ([source](https://teavm.org/docs/intro/overview.html))
