All Projects → shanhuio → Smlvm

shanhuio / Smlvm

Licence: other
Smallrepo Virtual Machine

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects
language
365 projects
assembler
53 projects

Projects that are alternatives of or similar to Smlvm

Quickjs
QuickJS是一个小型并且可嵌入的Javascript引擎,它支持ES2020规范,包括模块,异步生成器和代理器。
Stars: ✭ 2,199 (+729.81%)
Mutual labels:  compiler, virtual-machine, vm
Quickjs
The official repo is at bellard/quickjs.
Stars: ✭ 1,429 (+439.25%)
Mutual labels:  compiler, virtual-machine, vm
Ark
ArkScript is a small, fast, functional and scripting language for C++ projects
Stars: ✭ 312 (+17.74%)
Mutual labels:  compiler, virtual-machine, vm
Customasm
💻 An assembler for custom, user-defined instruction sets! https://hlorenzi.github.io/customasm/web/
Stars: ✭ 211 (-20.38%)
Mutual labels:  compiler, virtual-machine, vm
clox
A virtual machine and a tree-walk interpreter for the Lox programming language in C89 🌀
Stars: ✭ 38 (-85.66%)
Mutual labels:  vm, virtual-machine
Mtail
extract internal monitoring data from application logs for collection in a timeseries database
Stars: ✭ 3,028 (+1042.64%)
Mutual labels:  compiler, vm
specter
a (tiny) VM project built with Go
Stars: ✭ 57 (-78.49%)
Mutual labels:  vm, virtual-machine
SBTCVM-Gen2-9
SBTCVM is a virtual machine implementation of a balanced ternary (base 3) computer. Features several compiled languages for ternary software development.
Stars: ✭ 32 (-87.92%)
Mutual labels:  vm, virtual-machine
Lumen
An alternative BEAM implementation, designed for WebAssembly
Stars: ✭ 2,742 (+934.72%)
Mutual labels:  compiler, virtual-machine
c8c
The chip8 compiler, assembler, and virtual machine
Stars: ✭ 110 (-58.49%)
Mutual labels:  vm, virtual-machine
RSqueak
A Squeak/Smalltalk VM written in RPython.
Stars: ✭ 78 (-70.57%)
Mutual labels:  vm, virtual-machine
Never
Never: statically typed, embeddable functional programming language.
Stars: ✭ 248 (-6.42%)
Mutual labels:  compiler, virtual-machine
Openj9
Eclipse OpenJ9: A Java Virtual Machine for OpenJDK that's optimized for small footprint, fast start-up, and high throughput. Builds on Eclipse OMR (https://github.com/eclipse/omr) and combines with the Extensions for OpenJDK for OpenJ9 repo.
Stars: ✭ 2,802 (+957.36%)
Mutual labels:  compiler, virtual-machine
Tagha
Minimal, low-level, fast, and self-contained register-based bytecode virtual machine/runtime environment.
Stars: ✭ 101 (-61.89%)
Mutual labels:  vm, virtual-machine
Swift Lispkit
Interpreter framework for Lisp-based extension and scripting languages on macOS and iOS. LispKit is based on the R7RS standard for Scheme. Its compiler generates bytecode for a virtual machine. LispKit is fully implemented in Swift 5.
Stars: ✭ 228 (-13.96%)
Mutual labels:  compiler, virtual-machine
butterfly
Butterfly connects Virtual Machines and control their traffic flow
Stars: ✭ 48 (-81.89%)
Mutual labels:  vm, virtual-machine
vm-automation
VirtualBox automation using Python
Stars: ✭ 1 (-99.62%)
Mutual labels:  vm, virtual-machine
kcs
Scripting in C with JIT(x64)/VM.
Stars: ✭ 25 (-90.57%)
Mutual labels:  vm, virtual-machine
tsharkVM
tshark + ELK analytics virtual machine
Stars: ✭ 51 (-80.75%)
Mutual labels:  vm, virtual-machine
Cub
The Cub Programming Language
Stars: ✭ 198 (-25.28%)
Mutual labels:  compiler, virtual-machine

BuildStatus

Small VM

go get -u shanhu.io/smlvm/...

(Note that we use a custom domain rather than github.com.)

smlvm is a small, simulated virtual machine with a 32-bit instruction set. It also comes with a simple programming langauge called G. The language has a modern Go language-like syntax, and a C-like semantics and runtime.

The project is a pure Go project that only depends on the standard library. The compiler is written from scratch.

Try G language in the playground.

Using the makefile

The project comes with a makefile, which formats the code files, check lints, check circular dependencies and build tags. Running the makefile requires installing some tools.

go get -u shanhu.io/tools/...
go get -u github.com/golang/lint/golint
go get -u github.com/jstemmer/gotags

Comprehensible code

Go language is already fairly readable. To keep the project modularized and properly structured, we follow two additional rules on coding:

  1. Each file has no more than 300 lines. 80 characters max per line.
  2. No circular dependencies among files.

Note that Go language already forbids circular dependencies among packages.

With no circular dependencies, the project architecture can be visualized as a topology map. We find such maps extremely useful on developing complicated projects.

Similarly, G language projects for the virtual machine also follows the same rules. In fact, it is enforced by our compiler. For example, G language's standard library can also be visualized into into a topology map.

Copyright and License

Copyright by Shanhu Coding Society. Licence Apache.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].