tyrga is a project to translate Java Virtual Machine bytecode into tenyr assembly, in order to provide high-level language support on the tenyr CPU.
Like tenyr, tyrga is a personal project meant for didactic use. It should not be used to do real work, but it aspires to be fun and educational.
The capability envelope is defined by the test suite, which demonstrates both Java-language capabilities (like static blocks or switches) and algorithms (like GCD or a sieve of Eratosthenes).
Many capabilities of the JVM remain unimplemented, including basic things like memory allocation (although references to allocation can be translated).
The tyrga-cli
binary drives the tyrga-lib
library. The main entry point is tyrga-cli translate
, which takes Java 11-compatible .class
files on input and produces .tas
output files.
javac --release 11 -g:none test/Sieve.java
tyrga-cli translate --output test/Sieve.tas test/Sieve.class
Compare Sieve.java
and Sieve.tas
.