BlazeVM is intented to be a fun project to learn about the JVM internals. It is not intended to be used in production. BlazeVM does not attempt to be neither a full-featured JVM nor a high-performance one, the "blazingly-fast" comment is just humor. It is just a toy JVM.
I have been working with Java for quite a long time in the past, and also in other JVM-based languages like Scala and Kotlin. Moreover, I’m quite interested to know more about how a virtual machine like the JVM (or the Python VM) works, so with a bit of time in my hands I decided to start this project.
I might in the future try to create my own JVM-based language, but that is not the goal of this particular project. Nonetheless, if this idea ever comes to reality, I would know a lot more about the JVM intrinsics to create it. And it would be kinda cool to have a language that compiles to JVM bytecode but also run on my own JVM implementation. (Yeah i know, it’s basically creating a new interpreted language but with more steps and constraints. But it’s fun!)
Still the early days of this project, but you can now run some classes if they do not require native methods nor allocations nor String constants.
To run the example class MinimalClass
you will need to retrieve a JRE rt.jar
file and uncompressed it in a directory, here ./classpath
.
Note
|
|
# Clone the repository
git clone https://github.com/fusetim/blazevm && cd blazevm
# Build the project
cargo build --release
# Run the example class
RUST_LOG=debug ./target/release/cmd -c ./reader/res/test -c .classpath MinimalClass
Enjoy! You successfully ran a class in BlazeVM, and also calculate the sum of 1 and 1 =).
This project is licensed under the CeCILL 2.1 license (GPL-compatible license).
See the LICENSE file for more details.