• Announcement: Lua.org now officially recommends this forum as a meeting place for the Lua community
  • The forum is currently open to new registrations. The registration will close for a short period of time when reaching 500 active members, to upgrade the server resources.

Announcing WinLua Toolchain Installer - Release 2012a (1 Viewer)

dinsdale247

Moderator
Staff member
Community Patron
Creator of WinLua
Joined
Nov 17, 2020
Messages
68
Reaction score
27
Location
Victoria BC
Website
winlua.net
1608101865500.png

Good news everyone! WinLua Toolchain 2012a is ready.

WinLua Toolchain is now ready for general distribution. Winlua is a Windows development environment dedicated to Lua and C (and begrudgingly C++). WinLua Toolchain provides a (nearly) complete development environment in a windows MSI installer:
  • Lua - Lua 5.3 currently
  • LuaRocks - A Lua module package manager
  • WinLua Compiler (WLC) - A cutting edge C/C++ compiler
  • Sol3 C++ bindings for Lua
  • LibreSSL Encryption Library
  • and the XMake build system
With WinLua, there is no configuring LuaRocks or trying to figure out which C compiler to use. If you need to use Lua, drop to a powershell window and type `lua`, or open the Windows menu and type `lua`. Need a Lua module? LuaRocks is already set up with the proper paths to pull down a rock and compile it if necessary[1].

Everything in the WinLua Toolchain package comes in around 600 MB installed. The smallest comparable Visual Studio tool set is 6000+Mb.

Why WinLua?

The drive behind creating WinLua was the abysmal state of Lua on Windows. Prior to this forum, there was no place to find information about all the different ways to install Lua and the components that one needs to work in a Lua environment. That drove me to create a proper Windows installer for Lua. I soon found that installing LuaRocks was tricky and I was dependent on Visual Studio which is 10 - 20 Gigabytes. I started looking into mingw and couldn't make heads of tails of what tools I did or did not need (mingw, cygwin, mysys2, mingw32 vs mingw64). All that frustration and effort drove me to find a modern C/C++ compiler and create a complete environment that works on Windows without any other overhead or baggage[2]. My pain, your gain.

Who Is The Target Audience? You!

WinLua Toolchain has been created for beginners and advanced developers alike. The hope is beginners won't know what WinLua Toolchain provides because they will not experience the pain of piecing together an environment. Experienced developers will appreciate the simplicity of the MSI installer and the sublime power of the build system - xmake.

Ya, We Need To Talk About XMake...

The most exciting tool in my opinion is XMake. XMake is a Lua based build system and library repository. It has a compelling, easy syntax that is reminiscent of CMake without all the evil that comes with the CMake meta build philosophy. XMake is a fully functional build tool that works almost seamlessly with the WinLua Compiler (WLC) But best of all: it's SMOKING FAST. XMake is the ideal build solution for Lua developers on Windows because it harnesses all the best parts of our favorite language: Lua!

I will be writing about XMake in the future because it makes building C on Windows very pleasant. Watch this space...

Where To Start?

Head on over to WinLua - Lua Plus Tools for Windows. There are three installers:
  • Lua Only installer- Lua 5.3, Lua Filesystem and Sol 3. This is a 3 MB download if you just really need Lua.
  • WinLua Toolchain - The full kit. 530 Mb download.
  • LibreSSL - Current LibreSSL encryption library build. LibreSSL is not easily accessible on Windows so I decided to create a release.
Download WinLua Toolchain and just run the MSI installer and your ready to go. If you'd like to see a demo of WinLua at work, check out my Lua/C++ bindings articles: Part 1 and Part 2.

What Is Still Missing?

While there is a working debugger, it's command line only (As in gdb command line). The "machine interface" bindings didn't work properly so you can't debug in Visual Studio Code or KDevelop yet. I am working on that and am hoping to have lldb-mi built with Python bindings in the springtime. However, the compiler is perfectly functional and works for compiling LuaRocks and other C/C++ projects.

A Big Thank You

Thank you for taking the time to look at this project. My hope is that the Lua community can rally around this toolchain and encourage new developers to give Lua/C/C++ a chance on Windows.

I'm keen to get some feedback. Give it a shot and let me know how it goes? Please feel free to post here, or send a message to [email protected]. My git repository is a complete disaster so you won't find much going on there.

Enjoy!
dinsdale

Footnotes:
[1] Some rocks require pre-requisites that are not available through LuaRocks. I am working with the XMake creator to create a new repository for recipes to build these pre-requisites.
[2] People that argue for GNU Mingw-64 don't understand how hard it is to figure out what mingw really is and how it relates to Windows and Linux emulators like msys2. It took me months if not years to get a clear understanding of what was really needed to use Lua/C on Windows. While GNU/Mingw is a viable compiler (I use it at work sometimes) I found llvm-mingw more compelling.
 
Top