Mark Feldman's Home Page
Login   Search
Skip Navigation Links
  • Home
  • A RepRap is Born
  • Mini Prusa Build
  • Wireless Controllers
  • Terrain Demo
  • MAME
  • KopiLua (Lua for C#)
  • About Me
Skip Navigation Links>KopiLua (Lua for C#)
KopiLua is my line-for-line port of the Lua 5.1.4 source code (VM, parser, GC, etc), it also includes Windows console binaries of the interpreter and compiler. It's byte-code compatible with the C version so it should run existing binaries fine. All code has been ported to managed C# so it would probably also make a good starting point for ports to other languages.

Unfortunately KopiLua runs significantly slower than the native C version. The original code makes judicious use of macros which C# cannot inline. It also uses a lot of pointer arithmetic which had to be emulated in C# via overloaded operators. If you're running on a platform that can execute compiled C code and requires high performance then I'd suggest using a wrapper, but if you need something that runs in a managed-C#-only environment (XBox 360, various mobile platforms etc) then KopiLua may be your only option for supporting Lua.

Download KopiLua 0.1 (alpha)