Lua Plugin for Barracuda

Lua provides a small, fast, easily authored extension language for dynamic HTML pages with Barracuda.

Lua server pages (LSP) are similar to Barracuda CSP pages. With Lua the author requires simple scripting skills rather than a knowledge of C/C++. LSP performance (speed/memory) is comparable to CSP pages.

Lua is designed as a script language to embed in other programs. The implementation is extensible.

LSP pages can be maintained with commonly available HTML/XML tools.

On top of all of the great reason why Lua is good non-embedded, it has a straightforward license for embedding, few dependencies, unobtrusive API, a small binary footprint, and very readable/modifiable source code.

The Lua core depends lightly on the ANSI C runtime library. It requires only a few simple runtime library functions and basic C standard library functions.

Another feature that is nice for embedded applications that have limited memory is that the larger parts of the Lua core (lexer, parser, and code generator) can be very easily removed, and still leave a fully functional Lua, which of course can only run precompiled programs.

LSP pages expose most of the Barracuda API objects (e.g. response, request, session), hence writing to a HTML page can be performed with simple Lua code like:

<?lsp for i = 1, 10 do response:write "<h1>Hello World!<h2>" end ?>

Lua code and HTML can be freely intermixed.

LSP pages support the following tags: