A pure C binding of SDL 2.0 for Lua 5.1, Lua 5.2, and LuaJIT.
C CMake Lua
Latest commit 90221bd Dec 3, 2016 @Web-eWorks Web-eWorks committed with Compat and docs.


Lua-SDL2 (SDL2 binding for Lua)

Lua-SDL2 is a pure C binding of SDL2 for Lua 5.1, Lua 5.2, Lua 5.3, and LuaJIT.

The current version is 2.0.4-5.0


  • Pure C binding, tries to be as portable as SDL2,
  • Very close to SDL library,
  • Object oriented whenever possible (surfaces, textures, windows, etc.),
  • Well documented.


  • compiles with Lua 5.1, 5.2, 5.3, or LuaJIT
  • compiles with SDL 2.0.1 and later


If you have LuaRocks installed,

$ luarocks install lua-sdl2

Otherwise, read INSTALL.md for instructions to build it yourself.


The official website is hosted at:


The current documentation is available at the associated wiki:


Author and Maintainer

The Lua-SDL2 library was written by David Demelier markand@malikania.fr

It is currently being maintained by Joseph Wallace tangent128@gmail.com