Skip to content

A Work-In-Progress Java Virtual Machine implementation in Rust.

Notifications You must be signed in to change notification settings

PokeJofeJr4th/javarust

Repository files navigation

Usage

JVM-RS requires rust to be installed. Then use cargo run -- -h to display help text, or keep reading to see usage examples.

The simplest use is cargo run -- path/to/File.class. This will follow the relative path to the file and execute its main method, if found. Use another -- after the command's arguments to pass arguments to the program upon execution: cargo run -- path/to/File.class -- some arguments here.

If that file depends on other class files (most common if it is part of a project), add those other class files to the end -- cargo run -- path/to/File.class path/to/Another.class. It is also possible to use a text file with one relative path per line to load additional class files. For example, given the contents of path/to/project.txt below, the command cargo run -- path/to/File.class path/to/Another.class is equivalent to cargo run -- -p path/to/project.txt:

../File.class
../Another.class

Debugging JVM-RS

To enter debug mode, add -v. This will print a very verbose representation of the contents of the class file and each instruction executed. This has extreme consequences for performance and so should be used sparingly. To skip running the class, add -s. This can be useful for debugging issues relating to class file parsing.

References

Java Virtual Machine Specification

Java API Documentation

About

A Work-In-Progress Java Virtual Machine implementation in Rust.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages