Waf-based build recipe for Lua using VC++ or MinGW toolchains.
Switch branches/tags
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



A single-file build script using the Python-based Waf tool that downloads the Lua source and quickly builds Lua binaries and development artifacts for use on Windows systems.


  • Python 2.7
  • A zip extraction utility such as 7-Zip
  • MinGW, VC++, or Windows SDK build environment
  • Live internet connection if Lua source or the Waf cross-platform build tool haven't already been downloaded


  1. When building with VC++ or the Windows SDK, waf will select the build environment based upon the --msvc_version and --msvc_targets command line options. When building with a MinGW toolchain, ensure its artifacts are on your PATH and use waf's --check-c-compiler command line option. If you choose to build with MinGW, I encourage you to use the DevKit. While my instructions and install script are specific to Ruby, simply run the devkitvars.bat or devkitvars.ps1 script to bring the DevKit artifacts onto PATH to enable its use as a general purpose MinGW-based toolchain.
  2. Download one of the following project archives and extract into <your_build_dir>: master 5.2.1 5.2.0 5.1.5 5.1.4
  3. cd <your_build_dir>
  4. python wscript prepare (if waf and Lua source not already in <your_build_dir>/src)
  5. Windows SDK: python waf configure --msvc_version="wsdk 7.1" --msvc_targets="x86" or
    MinGW: python waf configure --check-c-compiler=gcc
  6. python waf to build
  7. python waf clean build to rebuild
  8. python waf build package (build and zip the dll, static library, headers, def, and implib)
  9. python waf distclean to remove the build directory and build lock files
  10. python wscript pristine to delete all downloaded and built artifacts


  • add test task
  • add binary downloads