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.

A new way of loading glues (a.k.a. modules)

A new method is introduced to GLUEscript: require. This method can be used to load glues. The method returns an object which contains all the classes and methods that are defined in the specific glue. The glue attaches this object also on the glue.modules object. require needs a URI to the glue. For a glue this must be a file URI. The object returned by require can be used to create shorter code. An example:

  var os = require("file:///c:/development/gluescript/bin/debug/glue_os.dll");

This example will load the glue_os glue. The object that contains all classes is stored in the os variable. This mean you can write something like this:

  var file = new os.File("test.txt");

Which is a shorthand for writing this:

  var file = new glue.modules.os.File("test.txt");

The object created by the glue is cached in the runtime. So calling require twice or more for the same glue, will not result in loading the glue again.

In the future it will also be possible to use require for loading modules written in JavaScript.