Ziglet v0.1.0 - Initial Release
I am excited to announce the first public release of Ziglet, a minimalist, high-performance virtual machine written in Zig. This release lays the foundation for a lightweight, secure, and extensible VM that is both easy to understand and highly performant.
Overview
Ziglet v0.1.0 implements a robust core with essential VM capabilities:
• A register-based architecture featuring 16 general-purpose registers
• A managed memory space of 64KB with safe bounds checking
• A stack-based execution model with built-in error handling
• A comprehensive instruction set covering arithmetic, control flow, memory operations, and stack manipulation
• Debugging support including instruction tracing, execution statistics, hot path detection, and instruction caching for basic performance insights
New Features
-
Core Architecture & Execution
- 16 general-purpose registers for computation
- A 64KB dedicated memory region with allocation and deallocation managed by the VM
- A program counter (PC) driven execution loop that processes a sequence of instructions
-
Instruction Set Enhancements
- Arithmetic Operations: ADD, SUB, MUL, DIV, MOD
- Memory Operations: LOAD (load immediate value), STORE (store register value to memory), LOAD_MEM (load from memory into register), MEMCPY (copy memory regions)
- Control Flow: Unconditional and conditional jump instructions (JMP, JEQ, JNE, JGT, JLT, JGE), and comparison operations (CMP)
- Stack Operations: PUSH and POP for stack manipulation
-
Debug & Optimization Tools
- An optional debug mode that provides detailed instruction tracing and runtime diagnostics
- Execution statistics tracking including instruction count and hot path detection
- An instruction cache using AutoHashMap to support future performance optimizations
-
Error Handling Enhancements
- Comprehensive error reporting with contextual information, source location details, and actionable suggestions
- Robust error types to cover memory access violations, invalid instructions, and register errors
Known Issues & Limitations
- The current version focuses exclusively on integer operations and does not yet support more advanced data types such as floating-point numbers or strings.
- The instruction set is minimal by design; additional operations (e.g., function calls, branching optimizations) will be added in future releases.
- Features such as Just-In-Time (JIT) compilation, garbage collection, threading, and a custom scripting language are planned for upcoming versions.
- Documentation and example programs are still in development and will be expanded over time.
Release & Upgrade Information
- This release is tagged as v0.1.0, representing our first stable checkpoint.
- If you are upgrading from a pre-release or testing build, please ensure that you rebuild the project after pulling the latest changes.
- We welcome feedback on this initial version via GitHub issues or community channels.
Future Roadmap
- Advanced Data Types & Function Calls: Support for floating-point numbers, strings, arrays, and function frame management.
- JIT Compilation & Garbage Collection: Enhancements to improve runtime performance and memory management.
- Threading & Concurrency: Exploring multi-threaded execution environments.
- Custom Scripting Language: A higher-level language for easier interaction with the VM.
- Enhanced Debugging & Profiling: More detailed tooling for debugging, breakpoints, and performance profiling.
- Extended APIs & FFI: Improved interfaces for embedding and communication with other languages.
Thank you for trying out Ziglet v0.1.0. Your feedback is invaluable as I continue to refine and extend the project.