What's GLUEscript?

GLUEscript (Glueing Libraries Using EcmaScript) is the successor of wxJavaScript. The new name covers the goal of this project: create a JavaScript engine which can be used as a general purpose language (like Perl for instance).

Read the history behind GLUEscript.

GLUEscript is developed by Franky Braem

SpiderMonkey

GLUEscript uses SpiderMonkey, the JavaScript engine used in FireFox.

SpiderMonkey

Portable Code

GLUEscript is written in portable C++ code. GLUEscript uses PoCo, a library for writing portable C++ code. And wxWidgets is used as GUI toolset. The GUI glue is optional.

Powered by POCO
Built with wxWidgets

GLUEscript uses Premake for generating makefiles for gcc, project files for Visual C++, CodeLite, Code::Blocks, ... Premake can be used on Windows, Linux and MacOS.

Why are there so many C++ macro's in GLUEscript?

GLUEscript uses a lot of macro's in the source code. While many developers find macro's evil, I find them useful for GLUEscript for the following reasons:

  • They reduce a lot of repeating code
  • They hide difficult to read code
  • When something changes only the macro needs to be changed

The third reason is the most important reason for me: Between two versions of GLUEscript the prototype of a callback was changed. Instead of searching and replacing all code in the source files, I only needed to change the macro of the callback.

The last reason of using macro's is that I have a dream, that one day I write a parser that automatically translates C/C++ code into GLUEscript code. Parsing the syntax of macro's is easier then parsing C/C++ code.