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 of Java 25, with garbage collection and multithreading planned for future releases.

§Features

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

§Usage

§1. Create a simple Java program

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

§2. Compile the program

javac Hello.java

§3. Run it with Rusty JVM

rusty-jvm Hello

Macros§

throw_and_return
unwrap_or_return_err
Unwraps a Result<T, E> and returns early as ThrowingResult::err(E) if it’s an Err.
unwrap_result_or_return_default
Unwraps a ThrowingResult<T>:

Structs§

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

Functions§

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