You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! Luastatic looks really cool — I already just finished hacking my way through the same problem space when I was told about about luastatic. (it did help me out teaching me some nm tricks when I got into cross-compiling!)
The use-case I had at hand was building a single-binary for LuaRocks, which includes a bunch of dependencies. The overall goal was described here, it's something I'd like to see as a goal for LuaRocks 3.1.
There's one big all_in_one Lua script which does mostly the same as luastatic, but also a static-gcc wrapper script and config file which fools LuaRocks into building static libraries even though it doesn't (yet) have support for it (the make binary target in the root LuaRocks makefile launches the whole thing).
We would like to add first-class support for static libraries in LuaRocks eventually (there was an unfinished Google Summer of Code project for that), and the above static-gcc hack looks promising.
Given that LuaRocks knows about dependencies (and third-party library dependencies as well), the idea of adding a command to LuaRocks that would produce a single-binary out of a script sounds compelling: it would essentially take a rock with a bin/ script and statically-compile it along with all its dependencies (essentially doing the equivalent of figuring out the luastatic command-line flags). At that point, luastatic could even be part of LuaRocks itself.
How does that idea sound to you?
The text was updated successfully, but these errors were encountered:
Hi! Luastatic looks really cool — I already just finished hacking my way through the same problem space when I was told about about luastatic. (it did help me out teaching me some nm tricks when I got into cross-compiling!)
The use-case I had at hand was building a single-binary for LuaRocks, which includes a bunch of dependencies. The overall goal was described here, it's something I'd like to see as a goal for LuaRocks 3.1.
This was the solution I ended up with so far:
https://github.com/luarocks/luarocks/tree/master/binary
There's one big
all_in_one
Lua script which does mostly the same asluastatic
, but also astatic-gcc
wrapper script and config file which fools LuaRocks into building static libraries even though it doesn't (yet) have support for it (themake binary
target in the root LuaRocks makefile launches the whole thing).We would like to add first-class support for static libraries in LuaRocks eventually (there was an unfinished Google Summer of Code project for that), and the above
static-gcc
hack looks promising.Given that LuaRocks knows about dependencies (and third-party library dependencies as well), the idea of adding a command to LuaRocks that would produce a single-binary out of a script sounds compelling: it would essentially take a rock with a
bin/
script and statically-compile it along with all its dependencies (essentially doing the equivalent of figuring out the luastatic command-line flags). At that point, luastatic could even be part of LuaRocks itself.How does that idea sound to you?
The text was updated successfully, but these errors were encountered: