| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
I don't think this is going to work well. The build script should be in each module, not inside mlua-sys. $ (cd tests/module && cargo build --release --features lua55)
warning: mlua-sys@0.11.0-rc.1: cargo:rustc-cdylib-link-arg was specified in the build script of mlua-sys v0.11.0-rc.1 (/Users/alex/Projects/mlua-rs/mlua/mlua-sys), but that package does not contain a cdylib target
Allowing this was an unintended change in the 1.50 release, and may become an error in the future. For more information, see <https://github.com/rust-lang/cargo/issues/9562>. |
Sorry, something went wrong.
|
You are right, there is no need for changes here. I thought I needed changes in my repo and yours, and didn't carefully check this one was required. I totally misunderstood what was going on, sorry! I've now more carefully understood what's happening and written a FAQ entry showing exactly how I fixed this in my project ( https://github.com/stacs-cp/demystify-rs ), and an example of what to put in their repo, in case that is helpful to other people. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
When building a Lua C module (cdylib with the module feature) on macOS, the linker fails with undefined symbols for the Lua API. This is because macOS requires explicit -undefined dynamic_lookup to allow unresolved symbols in shared libraries — unlike Linux which permits them by default.
The build script already had platform-specific handling for Windows (raw-dylib linking). This adds the equivalent for macOS, passing the required linker flags so that Lua symbols are resolved at load time from the host interpreter.
Fixes the issue reported in #625 -- I didn't find that PR until after I fixed it because it's closed, do you mind putting it in the source?