erde-lang / erde

A programming language that compiles to Lua.
https://erde-lang.github.io
MIT License
36 stars 4 forks source link

Add a Windows executable version #35

Closed Jamtoad closed 1 year ago

Jamtoad commented 1 year ago

Fennel and Moonscript both have executable version. It would be neat if we could get a version of Erde in this form so that It can more easily be ran on Windows without having to install WSL.

bsuth commented 1 year ago

Good point, I have a windows partition I can mess around with this weekend, but I may be a bit slow since I rarely use Windows and will need some time to get familiar with it :sweat_smile:

Jamtoad commented 1 year ago

Good point, I have a windows partition I can mess around with this weekend, but I may be a bit slow since I rarely use Windows and will need some time to get familiar with it :sweat_smile:

I've compiled (I don't know if that's the correct term) a couple of my own Lua files into executables. If you tell me which Lua files from this repo are needed or that you think may be needed for the executable I may be able to mash something together tomorrow haha. I can give it a shot either way, I am desperate to try out this language!

bsuth commented 1 year ago

Sure, that would be great! It should be all *.lua files in the erde directory, but just in case, here is the list:

Although they might still need to be in a subfolder called erde, otherwise require will probably fail to resolve (just a guess though)?

The main entry point for the CLI is cli.lua, so on Linux the executable is basically just an alias to lua erde/cli.lua

Jamtoad commented 1 year ago

I was able to turn it into an executable. I am having some issues since it requires LFS. I am fooling around with it still, Ill let you know if I am able to get it working. If you want to try on your own I am using this software. https://www.luart.org/doc/tutorial/rtc.html

bsuth commented 1 year ago

Hey @Jamtoad sorry about the delay!

I spent the last couple days reading several related projects (Luastatic, Fennel, Moonscript) and put together a repository over at https://github.com/erde-lang/erde-windows to handle building the windows executables. Indeed, getting lfs to work was quite tricky but I think I got something working (at least, it seems to work on my machine :eyes:).

I built executables for each of the major Lua version and attached a zip file in the release page. However, if you dont trust my executables you can also use the aforementioned repository to build them yourself (in that case, you should also replace the static Lua libraries in the repo with your own. The ones in the repository are from the official LuaBinaries SourceForge). Note that there is not an executable for LuaJIT, since there was no readily available static library for windows. I wasnt sure how difficult it would be to build one myself but figured that the existing executables should be enough. If there is enough demand in the future I am open to revisit this though.

Can you test out the executables and let me know if they work?

Jamtoad commented 1 year ago

Howdy @bsuth! No worries on the delay. I really appreciate you taking the time out to setup executables. They work perfectly! I tested the 5.1 version and it compiled a couple of .erde files without any issues! Thank you so much, I am super excited to give this language a try in a project I have going on!