Cencio VM is a compact stack-based virtual machine built around the idea of a minimal and extensible execution core. It uses a 32-bit instruction format with a small opcode set, dynamic frame chaining, and a constant pool to keep bytecode compact and language-agnostic. The VM provides two runtime stacks: an operand stack for execution and a frame stack for memory, scope, and control-flow management. Functions, loops, and blocks are represented through specialized frames, enabling dynamic scope resolution, branching, and multiple return values. Rather than embedding complex language features into the VM, Cencio relies on native functions and FFI extensions for most runtime semantics. This design allows different languages to share the same execution engine while keeping the VM simple, flexible, and easy to maintain.
Features
- Minimal Instruction Set — Compact opcode design focused on core execution semantics.
- Stack-Based Architecture — Simple and predictable operand evaluation model.
- Language-Agnostic Runtime — Designed to support multiple programming languages.
- Native FFI Integration — Easily extensible through external native functions.
- Compact 32-Bit Bytecode — Fixed-size instructions with efficient encoding.
- Low Compiler Complexity — Dynamic scope minimizes compiler bookkeeping.
- Pluggable Runtime Types — New types and behaviors can be added through libraries.
- Small Execution Core — Keeps the virtual machine simple, maintainable, and portable.
- Frame-Based Memory Model — Dedicated frames for blocks, loops, and function calls.
- Multiple Return Values — Functions can produce and expose more than one result.