Due to a generous contribution, we  now have the Lua interpreter running as an
application under UEFI.  The Lua library, LuaLib, is defined as an EDK II 
library
instance in order to facilitate embedding Lua within other UEFI applications.

Lua can be found in AppPkg at AppPkg/Applications/Lua.  The library instance is
defined in StdLib.inc and common include files are in StdLib/Include/Lua.

The following information is summarized from the Lua website: lua.org.


Introducing Lua for Uefi
========================

Lua is a powerful, fast, lightweight, embeddable scripting language.

Lua combines simple procedural syntax with powerful data description constructs
based on associative arrays and extensible semantics. Lua is dynamically typed,
runs by interpreting bytecode for a register-based virtual machine, and has
automatic memory management with incremental garbage collection, making it
ideal for configuration, scripting, and rapid prototyping.

Lua is designed, implemented, and maintained by a team at PUC-Rio, the
Pontifical Catholic University of Rio de Janeiro in Brazil. Lua was born and
raised in Tecgraf, formerly the Computer Graphics Technology Group of PUC-Rio.
Lua is now housed at LabLua, a laboratory of the Department of Computer Science
of PUC-Rio.

Lua has a deserved reputation for performance. To claim to be "as fast as Lua"
is an aspiration of other scripting languages. Several benchmarks show Lua as
the fastest language in the realm of interpreted scripting languages. Lua is
fast not only in fine-tuned benchmark programs, but in real life too.
Substantial fractions of large applications have been written in Lua.

Lua is distributed in a small package and builds out-of-the-box in all platforms
that have a standard C compiler. Lua runs on all flavors of Unix and Windows,
on mobile devices (running Android, iOS, BREW, Symbian, Windows Phone), on
embedded microprocessors (such as ARM and Rabbit, for applications like
Lego MindStorms), on IBM mainframes, etc.  And, of course, on UEFI firmware.

Lua is a fast language engine with small footprint that you can embed easily
into your application. Lua has a simple and well documented API that allows
strong integration with code written in other languages. It is easy to extend
Lua with libraries written in other languages. It is also easy to extend
programs written in other languages with Lua. Lua has been used to extend
programs written not only in C and C++, but also in Java, C#, Smalltalk,
Fortran, Ada, Erlang, and even in other scripting languages, such as Perl
and Ruby.

Adding Lua to an application does not bloat it. The tarball for Lua 5.2.3,
which contains source code and documentation, takes 246K compressed and 960K
uncompressed. The source contains around 20000 lines of C. Under Linux, the Lua
interpreter built with all standard Lua libraries takes 182K and the Lua
library takes 244K.  Under UEFI, the Lua interpreter takes 262K and the Lua
library, LuaLib.lib, is 1M.

For more information, visit the Lua web site at http://www.lua.org/.


Daryl McDaniel
SSG/STO/PSI (Platform Software Infrastructure)
Hillsboro, OR
(503) 712-4670

"Patriotism is supporting your country all the time, and your government when 
it deserves it."
-- Mark Twain

------------------------------------------------------------------------------
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to