https://github.com/silversquirl/govm
A bytecode VM using Go's runtime
https://github.com/silversquirl/govm
bytecode bytecode-interpreter go golang
Last synced: about 1 month ago
JSON representation
A bytecode VM using Go's runtime
- Host: GitHub
- URL: https://github.com/silversquirl/govm
- Owner: silversquirl
- Created: 2018-05-19T08:52:12.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-05-19T22:03:09.000Z (almost 7 years ago)
- Last Synced: 2025-03-18T02:58:26.565Z (about 1 month ago)
- Topics: bytecode, bytecode-interpreter, go, golang
- Language: Go
- Size: 25.4 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# govm
govm is a semi-statically typed bytecode VM written in Go. It utilises
Go's garbage collector rather than implementing its own, simplifying the
implementation and reducing the size of the library when linking to Go
programs.## Source code layout
govm contains a number of different packages with different purposes. Here
is a summary of how the source code is layed out:- `bytecode/` A package for reading and writing bytecode
- `codegen/` A package for generating GVB code
- `doc/` Documentation of the VM's internals
- `doc/bytecode.md` Documentation of GVB, govm's bytecode representation
- `doc/instructions.md` Documentation of the VM's instruction set
- `examples/` Example programs written in GVA, govm's assembly-like IR
- `gvas/` The govm assembler. Converts from GVA to GVB
- `gvi/` A CLI for the VM. Allows running GVB files from the command line
- `opcode/` A package containing constants for each opcode byte
- `stdlib/` The standard library
- `types/` Types used in many places throughout the project
- `./vm.go` The core VM package. Interprets GVB
- `./*_test.go` Tests for the VM