Crate rusty_jvm

Crate rusty_jvm 

Source
Expand description

§Rusty JVM

A Java Virtual Machine (JVM) interpreter written in Rust from scratch — with no dependency on existing JVMs.

rusty-jvm executes Java bytecode in interpreted mode and aims to support as much of the Java language as possible. It currently supports a broad set of language features up to Java 23, with garbage collection and multithreading planned for future releases.

§Features

See the README.md for the full list of implemented features.

§Usage

§Step 1: Create a simple Java program

Create a file named Hello.java with the following content:

public class Hello {
    public static void main(String[] args) {
        System.out.println("Hello, world!");
    }
}
§Shortcut (one-liner)

On Windows (cmd):

echo public class Hello { public static void main(String[] args) { System.out.println("Hello, world!"); } } > Hello.java

On Unix-like systems:

echo 'public class Hello { public static void main(String[] args) { System.out.println("Hello, world!"); } }' > Hello.java

§Step 2: Compile the Java program (currently tested with Java 23)

javac Hello.java

§Step 3: Run the compiled Java program with Rusty JVM

rusty-jvm Hello

Structs§

Arguments
Represents the command-line arguments for the Java program.

Functions§

run
Launches the Rusty Java Virtual Machine with the given arguments.