lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]





On Sun, Mar 8, 2020 at 5:20 AM Fernando Jefferson <fjefferson@inf.puc-rio.br> wrote:

I am interested in participating.

It would be an interesting tool for the course We´ve developed, within the UpLua Project:

https://www.slideshare.net/FernandoJefferson/project-up-lua-200120

That's great news, your project had caught my attention some months back. The tools for Windows IoT are already present in llvm-mingw. Once the Windows 10 side stabilizes, I was going to integrate PolyMCU ( https://github.com/labapart/polymcu), which claims to build code for any MCU that supports CMSIS (Arm compatibility library), on any host operating system, with any compiler. PolyMCU already has a MicroPython port. 

While the current WinLua Compiler setup is designed to use mingw exclusively, that shouldn't be difficult to change. The wlcXX.exe vanity front end is a modification to the existing (llvm-mingw) C application that reads the executable name for platform triplets (e.g x86_64-w64-mingw32-clang.exe).  I want to modify that front end to include a Lua interpreter (unsurprisingly) to read Lua config files for platform/build information. This should make it trivial to build Windows side scripts and embedded Lua applications with the same toolset.

Regards,
Russell

Fernando Jefferson
CCE-PUC-Rio - Professor
UpLua Project - Coordinator
Cel: +5521-99763-2135

Em 2020-03-07 16:09, Russell Haley escreveu:

Hi everyone,
 
TLDR; I'm looking for brave testers to try the new compiler toolchain, especially if you have a Win10 computer that doesn't have Visual Studio/VC++ or any other compilers on it. There are some minor warnings below.
 
I'm please to share the new installer for WinLua Release 3: Alpha 2. WinLua is fast becoming a complete toolchain for running Lua on Windows. The new Release 3 Alpha package contains *a complete C Compiler toolchain for Windows 10*. Yes, that's correct: Visual Studio/ VC++ is not required to use C based Lua modules on Windows 10 [1].
 
The WinLua Compiler Toolchain (WLC) is a slightly modified version of Martin Storsjo's llvm-mingw compiler toolchain found here: https://github.com/mstorsjo/llvm-mingw. The compiler can be invoked to build 32 or 64 binaries against mingw by calling wlc32.exe or wlc64.exe respectively. Best of all, the MSI installer configures LuaRocks to work with the Win Lua Compiler Toolchain. That means after the installer finishes you can open a Powershell window in Administrator mode and type `luarocks install <yer-favorite-C-module>` and everything "just works" (tm). 
 
Anyway, I'm very excited and there is a great deal of information to share but I'll try to keep this "brief". As stated in the TLDR I need testers but that comes with a few caveats/bugs/comments:
 
1) The installer leaves files around after you remove it, including LuaRocks libs. To remove them, delete the WinLua folder under c:\Program Files (x86).
2) The installer leaves an environment variable: LUAROCKS_SYSCONFDIR that should be manually removed as to not affect future Luarocks installations.
3)  I have tested against a handful of C modules. LuaSocket is the only one that outright fails due to a configuration setting in the RockSpec. To build it, download the git repo and modify the rockspec to remove "LUASOCKET_INET_PTON" from the mingw32 table. Contact me if you need more details.
4) I have not built anything against the LibreSSL binaries (which are current at 3.0.2 by the way).
5) Visual Studio still works with the LuaRocks installation, but that configuration has only been lightly tested with this installer. Gcc-mingw has not been tested, but should work.
 
So, finally the link. The installer is 162MB  which is too large for GitHub so I will need to find a new distribution method. Until such time, the following is a public link to my OneDrive: https://1drv.ms/u/s!AhdX-12NH-BT2Hroykjz7_VAik4f?e=JKmvkS
 
Please feel free to comment on this mailing list, but if you find bugs or have suggestions, I would appreciate them in a GitHub issue here: https://github.com/WinLua/WinLua-Source-Code. Feel free to file a bug, then report it here. Best still, subscribe to Win
 
I don't recommend trying to pull down the source code from WinLua-Source-Code at this time as it's a ungodly mess and many binaries are built out of band and copied in. Once I have a successful release, I will re-tool and automate the build system. Until then, binaries are your best bet.
 
Thoughts, comments, sticks and stones are welcome. The LLVM + MinGW toolchain presents a number of exciting opportunities, including Lua on Windows IoT and ports for building Lua into Arm Cortex M4 based computers that support CMSIS (e.g. like STM32).
 
Cheers,
Russell
 
[1]  A VC redist is all that's required for Windows 7 & 8, but I have no intention of supporting anything other than Windows 10.

 

--