Cava is a Cyna rewrite of Zava, a small Java VM originally written in Zig.
The goal is not to build a full JVM, add a JIT, or redesign Zava. The goal is to reimplement the behavior that Zava already supports, using the Zig codebase as the executable reference, while exercising Cyna on a real systems-programming workload.
I am proud to be the author of Cyna. ✨🚀💛
Cava has two equal purposes:
- Reach behavior parity with the current Zava implementation.
- Identify Cyna language, runtime, standard-library, and tooling gaps.
When Cyna cannot express a Zava construct directly and cleanly, the port should pause and record the gap instead of hiding it behind a workaround.
In scope:
- Current Zava classfile parser behavior.
- Current class loading model.
- Current method area and symbol/string interning.
- Current
Value,Reference,Object,Class,Field, andMethodmodel. - Current heap allocation style.
- Current bytecode interpreter loop.
- Current implemented JVM bytecodes.
- Current exception handling behavior.
- Current native method bridge.
- Current example programs and supported JDK classes.
- A simple post-parity stop-the-world mark/sweep garbage collector.
Out of scope:
- Moving, generational, concurrent, or performance-oriented garbage collection.
- JIT compilation.
- JVM verifier.
- Full JVM compliance.
- Threading and concurrency.
- Performance redesign.
- New class library support beyond what Zava already runs.
- Architecture refactoring before parity.
If Zig Zava supports it, Cava should support it.
If Zig Zava panics, leaves it TODO, or does not support it, Cava may do the same until parity is reached.
If Cyna has a language, runtime, library, or tooling limitation that prevents a clean port, stop at the smallest reproducible case and document it in docs/gap-log.md.
Cava tests live beside their production modules as src/*.test.cy files.
Each test file explicitly imports its sibling module and is compiled as an
independent root:
cyna testSet CAVA_TRACE=1 to print each executed bytecode instruction:
CAVA_TRACE=1 ./build/cava examples/classes/HelloWorld.class