Add native Linux support#2
Open
blablup wants to merge 1 commit into
Open
Conversation
Build luasocket 3.1.0 and luasec 1.3.2 as Linux shared objects matching the bundled lua files, compiled against LuaJIT 2.1 headers (Lua 5.1 ABI, as shipped with the native Linux build of X4). OpenSSL 3.5 (LTS) is linked statically into ssl.so because the Steam Linux Runtime container does not provide libssl at run time. init.lua now picks the platform-specific library extension (.dll/.so) via package.config. Windows behaviour is unchanged. build-linux.sh reproduces the Linux binaries from upstream sources. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
LuuOW
reviewed
Jun 17, 2026
LuuOW
left a comment
There was a problem hiding this comment.
Technical audit: Implementation verified for system consistency and engineering integrity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Makes this library work on the native Linux build of X4 (tested on Arch/CachyOS, X4 7.x via Steam Linux Runtime), while leaving Windows behaviour unchanged. Closes #1
lua/luasocket/core.so,lua/luasocket/mime.so,lua/luasec/ssl.so: LuaSocket 3.1.0 and LuaSec 1.3.2 built from the upstream sources (matching the bundled lua files), compiled against LuaJIT 2.1 headers (Lua 5.1 ABI). The native Linux build of X4 shipslibluajit-5.1.so.2, so the modules are left with undefinedlua_*symbols that resolve against the game process at load time — the standard approach for Lua C modules on Linux.ssl.so: the game runs inside the Steam Linux Runtime container, which does not providelibsslat run time, so dynamic linking against the host OpenSSL fails withlibssl.so.3: cannot open shared object file. After static linking,ssl.soonly depends onlibc.lua/init.lua: picks the platform-specific library extension (.dll/.so) viapackage.config.build-linux.sh: reproduces the Linux binaries from upstream sources (LuaSocket/LuaSec git tags + OpenSSL release tarball).Testing
package.loadlibunder LuaJIT, HTTPS GET/POST against external servers return 200 through the library's non-blocking client.🤖 Generated with Claude Code