Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Allow external build scripts to link Lua libraries #529

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sculas
Copy link

@Sculas Sculas commented Feb 15, 2025

This PR makes a small change to mlua-sys (and mlua to propagate the feature) that allows external crates and build scripts to do the compilation and linking part of the Lua libraries.

For my use case, I'm working on Pluto bindings for mlua (which I'll release very soon). Pluto allows for many sandboxing options, which is why I created a separate build script for it. In this script, you can configure each of those options to suit your needs.

In this case, the Pluto build script also handles the compilation and linking of the static library. This PR allows this system to work.
This is also useful for any future Lua forks/derivatives since you're no longer bound to what mlua can compile, instead you just need to confirm that the ABIs match.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant