Abstract Script Engines, or ASE, is a multi-platform and language-independent scripting environment. ASE has an in-process communication mechanism which allows objects to communicate together across language boundaries. Supported languages and runtimes for this release include C++, Java, COM, .NET, Lua, Perl, SpiderMonkey, and Rhino.
Features:
Download, build and install the following rpm packages. Source RPMs can be downloaded from the ASE download page.
| luacpp | Lua build with c++ |
| jsmt | SpiderMonkey build with multi-threading support |
| jdk | Java SDK ( http://java.sun.com/javase/downloads/index.jsp ) |
| rhino | Rhino JavaScript interpreter |
| pmcjs | Perl-SpiderMonkey bridge |
| ase | ASE runtime |
Source tarballs can be downloaded from the ASE download page. There are some requrements for language engines to work with ASE.
On Windows, "aserun.exe" and "aserunw.exe" are the executables for ASE-compatible scripts. The former opens a console and the latter does not. Here is an example.
C:\Program Files\ASE\samples>aserun genuuid.lua
a91868b7-cada-4f62-9ba0-2ff5108fd041
On Unix OSes, "aserun" is the executable.
$ aserun genuuid.lua
df97470d-0bab-40b5-9a64-d9a1aff3f68a
There are some samples in the samples directory.
| Script | Uses | |
|---|---|---|
| args.js args.lua | Host.Args | shows how to get commandline arguments |
| dir.js dir.lua dir.rh | Perl (IO::Dir) | uses a Perl module from other languages |
| gd.js gd.lua gd.rh | Perl (GD) | generates a png file using GD library |
| genuuid.js genuuid.lua genuuid.pl genuuid.rh | Native.Util.UUID | generate a UUID (aka GUID) |
| glade.js glade.lua glade.rh | Perl (Gtk2::GladeXML) | a simple notepad |
| javathread.js javathread.lua | Java (java.lang.Thread) | uses Java threads from JavaScript and Lua |
| jsort.js jsort.lua jsort.pl | Java (java.util.Arrays) | shows how to create dynamic proxies for Java interfaces |
| nativethread.lua nativethread.js | Native.Util.Thread | |
| swing.js swing.lua swing.pl | Java (javax.swing) | a simple GUI application |
| termcap.js termcap.lua | Perl (Term::Cap) | |
| webbrowser.lua webbrowser.pl | CLR (System.Windows.Forms) | a minimal web browser |
| word.js word.lua | COM (Word.Application) |
Samples in the svrsamples directory show how to implement a library using a statically typed language and how to use it.
| svrsamples/native | C++ |
| svrsamples/java | Java |
| svrsamples/clr | .NET assembly (Windows only) |
| svrsamples/com | in-process COM server (Windows only) |