Metascala: A tiny JVM written in Scala

I mentioned this on one of the earlier threads on JVM security; it's the cumulation of my attempts to lock-down the JVM securely, and finally giving up and just writing my own. It's now reached the point where its actually pretty usable, with a good spread of test cases. Apart from the security angle, its small size would make it useful for doing all sorts of VM-related experimentation.

Metascala is a tiny metacircular Java Virtual Machine (JVM) written in the Scala programming language. Metascala is barely 3000 lines of Scala, and is complete enough that it is able to interpret itself metacircularly. Being written in Scala and compiled to Java bytecode, the Metascala JVM requires a host JVM in order to run.

The goal of Metascala is to create a platform to experiment with the JVM: a 3000 line JVM written in Scala is probably much more approachable than the 1,000,000 lines of C/C++ which make up HotSpot, the standard implementation, and more amenable to implementing fun features like continuations, isolates or value classes.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Someone should really port

Someone should really port Jikes RVM to Scala :)

Yeah, it's a pity that the

Yeah, it's a pity that the primary implementations of the "open source" JVM is the monstrous, million-line C++/assembly open-source-but-we'll-sue-you-if-you-try-using-it openjdk, and a menagerie of proprietary alternatives.

Jikes RVM is 100% java I

Jikes RVM is 100% java I believe, that makes bootstrapping kind of fun.