| Crates.io | rusty-jvm |
| lib.rs | rusty-jvm |
| version | 0.5.0 |
| created_at | 2025-05-26 18:17:50.988592+00 |
| updated_at | 2025-09-27 15:21:32.279509+00 |
| description | An implementation of a Java Virtual Machine (JVM). |
| homepage | https://github.com/hextriclosan/rusty-jvm |
| repository | https://github.com/hextriclosan/rusty-jvm |
| max_upload_size | |
| id | 1690109 |
| size | 589,196 |
This project is a Java Virtual Machine (JVM) implemented in Rust, built to run Java programs independently of existing JVMs. Everything related to Java is implemented from scratch. The current version executes Java bytecode in interpreted mode, with the introduction of a Just-In-Time (JIT) compiler identified as a future milestone. The next major objectives include the integration of garbage collection and support for multithreading.
See integration tests for broader examples of supported Java features.
This project relies on standard library classes from the JDK 25 (LTS).
To run the Java code, you must have JDK 25 (LTS) installed on your machine and ensure the JAVA_HOME environment variable is properly set.
Ensure the following are set up:
Create a file named FruitCount.java with the following content:
import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
public class FruitCount {
public static void main(String[] args) {
List<String> fruits = List.of("apple", "banana", "apple", "orange", "banana", "apple");
Map<String, Long> counts = fruits.stream()
.collect(Collectors.groupingBy(Function.identity(), Collectors.counting()));
System.out.println(counts);
}
}
Compile the program using the Java compiler:
javac FruitCount.java
Run it using rusty-jvm:
cargo run -- FruitCount
rusty-jvm is licensed under the MIT License.