qscript 0.8.0-alpha

A Simple Scripting Language

To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:


A Simple Scripting Language.

This version is currently under development, and has several bugs, use [v0.7.4](https://github.com/Nafees10/qscript/tree/v0.7.4)

Setting it up

To add QScript to your dub package or project, run this in your dub package's directory:

dub add qscript

After adding that, look at the source/demo.d to see how to use the QScript class to execute scripts.

Getting Started

To get started on using QScript, see the following documents:

  • spec/architecture.md - How qscript works under the hood. Don't bother if you wont be using advanced stuff.
  • spec/libraries.md - Built in QScript libraries. // TODO write this
  • spec/syntax.md - describes QScript's syntax and more.
  • source/standalone.d- A demo usage of QScript in D langauage.
  • examples/ - Contains some scripts showing how to write scripts.

The code is thoroughly documented. Separate documentation can be found here.


QScript comes with a standalone configuration, so it can be used without being first integrated into some program as a library. You can build it using:

dub build qscript -c=standalone -b=release

You can use this executable to run scripts, inspect the generated AST for script, or the generated NaVM bytecode:

./qscript /path/to/script # execute a script

./qscript --ast /path/to/script # pretty print AST for script

./qscript --bcode /path/to/script # print NaVM bytecode for script


  1. Dynamic arrays
  2. Static typed
  3. Function overloading
  4. References (pointers, but a bit simplified)
  5. Structs
  6. Enums
  7. Global Variables
  8. Importing libraries (script can be loaded as library too)

Hello World

This is how a hello world would look like in QScript. For more examples, see examples/.

import qscript_stdio;

function void main(){
	writeln ("Hello World!");
  • Nafees Hassan
utils, navm
0.8.0-alpha 2021-Mar-22
0.7.4 2021-Feb-02
0.7.3 2020-Dec-17
0.7.2 2020-Oct-27
0.7.1 2020-Mar-14
Show all 23 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 192 downloads total

Short URL: