Skip to content
/ tyrga Public

Translate a useful subset of JVM bytecode to tenyr assembly

Notifications You must be signed in to change notification settings

kulp/tyrga

Repository files navigation

tyrga README

Rust CI

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.

Status

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).

Basic Usage

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.

About

Translate a useful subset of JVM bytecode to tenyr assembly

Topics

Resources

Stars

Watchers

Forks