2015年3月26日 星期四

Lua on UEFI



EDK2 下Lua 源碼位置 :Lua

Readme.txt

Embedding Lua
-------------
The Lua library instance, LuaLib, is defined by StdLib.inc.  Since, currently, all applications which
embed Lua are also StdLib applications, StdLib.inc will be included by your package's .DSC file.

The header files required to use LuaLib are in the standard include path at StdLib\Include\Lua.
They may be referenced as:
  #include  <Lua/lua.h>
  #include  <Lua/lualib.h>
  #include  <Lua/lauxlib>
  #include  <Lua/luaconf.h>

Lua/luaconf.h is the Lua configuration file.  If you wish to build Lua with custom characteristics,
this is the file to modify.  Modify the file in StdLib\Include\Lua since the file in the Lua
source tree is just a stub which references the file in StdLib.


Installation on UEFI
--------------------
Install the Lua.efi file into \Efi\Tools.   This is the standalone Lua interpreter.
Create a directory, \Efi\StdLib\lib\Lua.    This is the default location for Lua scripts.

If desired, copy the files from AppPkg\Applications\Lua\scripts, in the source tree, into
\Efi\StdLib\lib\Lua.

Bugs and Other Issues
---------------------
EOF characters, ^D or ^Z, are not properly recognized by the console and can't be used to
terminate an application.  Use os.exit() to exit Lua.


使用操作如下:



fs0>lua
>require("myprint")
>viewtable(package.loaded)
>print(package.path)
>print(package.cpath)




Download : efi.zip




只有lua才能编译出小于200K的代码吗?NO! Python 也可以 ...


有空來試試Python on UEFI







沒有留言:

張貼留言