[fpc-pascal] Pascal Scripting Engines

Sven Barth pascaldragon at googlemail.com
Sat Dec 11 17:26:01 CET 2010

On 10.12.2010 20:18, Andrew Brunner wrote:
> Hi there,
> I'm considering pascal scripting engines in stead of hot-swaped compiled
> stored objects/dlls for server back-end development for clients (namely
> WebSocket/JS).  I came across a few relatively recent solutions and
> wanted to know if there are any obscure "light weight" scripting engines
> but yet leverage byte code.  My largest problem would be security
> though.  I would want to limit script engine access to OS level calls.
> I need to be able to "sandbox" these back-end apps so they don't
> interfere with the server process.
> Any thoughts/recommendations?  Thanks.

Some time ago I have converted Delphi Web Script (see 
http://sourceforge.net/projects/dws/ ). Don't let the name fool you 
though. It's a normal scripting engine and I'm successfully running it 
on i386-win32, i386-linux and x86_64-linux. I've also tested a simple 
script on arm-wince.

But DWS hasn't been updated since quite some time and recently someone 
else has started a fork of it with focus on Delphi 2009+ compatibility. 
I'm currently trying to compile this new variant with FPC, but the 
author has decided to use many Delphi 2009+ features like extended 
records (luckily the author isn't using variant parts, so I can use 
objects), extended RTTI (although that is concentrated in one unit), 
generics (solveable with some ifdefs) and nested types (I'll have to 
test trunk here, because 2.4.2 has problems with Delphi's syntax).

A link to the author's blog is here: http://delphitools.info/dwscript/ 
I'd suggest you to read through his DWS related blog entries ( 
http://delphitools.info/tag/dws/ ) as they contain some interesting 
performance information as well - which might not be valid for the old 
DWS though.


More information about the fpc-pascal mailing list