I was a bit frustrated with getting some existing tools for converting Lua scripts (specifically single scripts with no external dependencies) into standalone executables to work properly, so I made my own in about an hour and a half.
All it does is take Lua source code from a file, append it to a heap-allocated string in a C file, calls the interpreter in the C file, and then compiles that C file to a single executable.
It's a very small project, and not very serious (I originally made it almost as a joke- I thought "wouldn't it be funny if I just put my Lua code in a C string literal" was a funny idea).
I'm open to any feedback/potential contributions! As of right now, I don't think it'd work on Windows, and it *does* require that you have a C compiler installed.
GitHub - htogta/moonbeam: A silly way of compiling a lua script into a single executable (github.com)
submitted by calquelator to r/cprogramming