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 external functions, and use it in your program.
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 (only dmd is tested)
- Internet connection (for dub to fetch NaVM and its dependencies)
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:
This binary also has 4 external functions:
- ID: 0, call using `ExecuteFunctionExternal 0 n` where n is number of integers to pop from stack and writeln(int) to terminal
- ID: 1, call using `ExecuteFunctionExternal 1 n` where n is number of doubles (floats) to pop from stack and writeln(double) to terminal
- ID: 2, call using `ExecuteFunctionExternal 2 n` where n is number of strings to pop from stack and write to terminal
- ID: 3, call using `ExecuteFunctionExternal 3 0` reads a line from stdin, pushes it to stack
NaVM is licensed under the MIT License - see LICENSE for details
- Registered by Nafees Hassan
- 0.2.4 released 3 years ago
- Copyright © 2019-2020, Nafees
1.4.1 2023-Apr-14 1.4.0 2022-Jul-21 1.3.0 2022-Jul-12 1.2.1 2021-Jun-26 1.2.0 2021-Jun-08
- Download Stats:
0 downloads today
0 downloads this week
2 downloads this month
100 downloads total
- Short URL: