docs: reposition around Lua 5.1 interop rather than general scripting - #12
Merged
Conversation
The README led with 'embed Lua 5.1 in your Node.js programs', which invites a comparison against wasmoon and fengari that this package loses: both need no C++ toolchain, and requiring one is a real barrier. That comparison is also the wrong one. The reason to reach for this is that you need Lua 5.1 *exactly* -- to interoperate with a runtime you do not control, such as firmware, Redis scripting or OpenResty -- or that you need real filesystem and process access rather than a sandbox. No no-compile alternative can offer either, because they target a different Lua version and run sandboxed. Adds an honest 'is this the right package?' section that names those alternatives and says plainly when to prefer them. Sending the wrong users away costs nothing; the right ones can now recognise their problem. Also documents that this is stock PUC-Rio Lua 5.1.5 and not LuaJIT, so precompiled bytecode is not interchangeable with a LuaJIT target -- source and C API compatibility are unaffected. And records that Node-API is ABI-stable across Electron as well as Node, which is what makes the addon usable inside a VS Code extension without rebuilding per host release. npm description and keywords updated to match, since that is what appears in search results. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
The README led with "embed Lua 5.1 in your Node.js programs" — which invites a comparison this package loses:
But that is the wrong comparison. You reach for this when you need Lua 5.1 exactly — to interoperate with a runtime you don't control (firmware, Redis scripting, OpenResty, game modding) — or when you need Lua to touch the real filesystem and run real processes. No no-compile alternative can do either: they target a different Lua version and run sandboxed.
Changes
os.executeis the point of the package, and that has an obvious implication.I deliberately did not assert version numbers for wasmoon or fengari — I could not verify those from the registry, so the table describes their approach in their own words and leaves the version claim as "a newer Lua than 5.1".
Verified
package.jsonstill at 2.0.1 (release-please's bump untouched)🤖 Generated with Claude Code