# lihaoyi/Metascala

A JVM written in Scala

Repository: https://github.com/lihaoyi/Metascala
Canonical: https://ross.abutalabs.com/products/metascala
Language: Scala
License Family: other
Last push: 2023-07-23T00:16:47+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4931, "days_push": 1138, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1185, forks 95 (observed 2026-08-28T04:03:54.942785+00:00)

## What it is
Metascala is a tiny metacircular Java Virtual Machine written in about 3000 lines of Scala, including a bytecode interpreter, a stack-machine to SSA register-machine translator, a custom heap with a copying garbage collector, and partial JNI support. It runs on a host JVM and is intended as an approachable platform for experimenting with JVM features and running untrusted bytecode in a virtualized sandbox.

## Use cases
- experiment with JVM internals without reading HotSpot's million lines of C++
- run untrusted Java bytecode in a sandboxed interpreter
- implement experimental language features like continuations or value types on the JVM
- learn how a virtual machine, heap, and garbage collector work
- translate stack-machine bytecode to SSA register-machine form

## When to choose
- you want a small, readable JVM codebase to study or modify
- you need a research playground for VM-level experiments like continuations or isolates
- you want to safely interpret untrusted bytecode with virtualized memory and CPU usage

## When to avoid
- you need a production-grade, high-performance JVM
- you require full JVM compatibility or up-to-date Scala support
- you need maintained software with an explicit license

## Facets
- artifact type: library
- maturity: maintenance
- function: interpreter, compiler, security
- domain: programming-languages, compilers, security
- platform: jvm
- tags: jvm, metacircular-interpreter, bytecode, garbage-collector, research, sandboxing, virtualization

## Member repositories
- lihaoyi/Metascala (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:54.942785+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:24:07.727228+00:00, confidence not recorded.
  - readme: https://github.com/lihaoyi/Metascala (fetched 2026-08-28T04:03:54.942785+00:00, sha 14feb839b72d)
- Data as of 2026-08-30T08:39:29.467469+00:00.
