64-bit register-based virtual machine and compiler written in Zig. Nyx supports compiling a simple assembly-like language into bytecode and executing it on a custom VM.
Warning
Nyx is in very early development. It is incomplete, lightly tested, and many features are missing. Expect breaking changes and unstable behavior.
- Custom assembly-like language
- Compiler to bytecode
- Virtual machine with registers, stack, memory, and basic instructions
- Written in safe, modern Zig
Clone the repo and build:
git clone https://github.com/ciathefed/nyx.git
cd nyx
zig build -Doptimize=ReleaseFastThis will create the binary at zig-out/bin/nyx.
nyx build examples/hello.nyx -o hello.nybnyx run examples/hello.nyxYou can also specify memory size (default is 65536 bytes):
nyx run examples/hello.nyx --mem 8192nyx execute hello.nybWith a custom memory size:
nyx execute hello.nyb --mem 16384.section text
_start:
mov q0, 1
mov q1, message
mov q2, 14
mov q15, 3
syscall
hlt
.section data
message:
db "Hello, world!\n", 0x00Contributions are welcome. If you find a bug or want to add a feature, open an issue or pull request.
To contribute code:
- Fork the repository
- Create a new branch
- Make your changes
- Open a pull request with a clear description
Please follow the Conventional Commits format for commit messages. Examples:
fix: handle empty source input in reporterfeat: add support for multiple source filesrefactor: simplify diagnostic builder
Keep changes focused and minimal. Include tests when appropriate.
This project is licensed under the MIT License