Crate rusty_jvm

Source
Expand description

§Rusty JVM

A JVM interpreter written in Rust from scratch — 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. Currently supports a range of Java language features up to Java 23 (excluding GC and lambdas for now).

§Features

Refer to the README.md

§Usage Modes

The binary supports three main modes, based on CLI arguments:

  • (default) Runs a Java class file with an entry point.
  • --install – Installs standard libraries (used by the VM).
  • --purge – Removes installed standard libraries.

§Example

§Installing core libraries

rusty-jvm --install

§Creating a simple Java program

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

§Compiling the Java program (current supported version is Java 23)

javac Hello.java

§Running the compiled Java program with Rusty JVM

rusty-jvm Hello

Structs§

ParsedArguments
Represents the parsed command-line arguments for the Java program.

Functions§

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