A simple VM intended to be used in scripting languages
To use this package, run the following command in your project's root directory:
Put the following dependency into your project's dependences section:
A VM designed to be fast, intended for use in scripting languages.
It's sometimes written navm instead of NaVM, both are the same
These instructions will get you a copy of NaVM with its very basic instuctions, which will serve as a demo.
Remember, NaVM is not built to be a standalone application, it's meant to be used as a library (originally built
for QScript, but everyone's free to use it).
source/app.d to see how to add new instructions, & execute byte codes.
spec/instructions.md for NaVM's syntax and a list of instructions you can use.
examples/* for some example byte codes. These can be run using the demo build.
You need to have these present on your machine:
- dlang compiler (
dub fetch navm
to download this package, and then run:
dub build navm -b=release -c=demo
to fetch dependencies and build NaVM.
Following this, you will have the NaVM binary (named
demo) with very basic functionality.
You can now run NaVM bytecode using:
The demo program contains 4 additional instructions:
writeInt- pops 1 integer from stack, and writes it to stdio.
writeDouble- pops 1 double from stack, and writes it to stdio.
writeChar- pops 1 char from stack, and writes it to stdio.
writeStr- pops 1 string (array of char) from stack, and writes it to stdio.
NaVM is licensed under the MIT License - see LICENSE for details
- Registered by Nafees Hassan
- 0.9.0-beta.1 released 3 days ago
- Copyright © 2019-2021, Nafees Hassan