jcmoyer / rust-lua53

Lua 5.3 bindings for Rust
MIT License
158 stars 45 forks source link

Export include path in build metadata #96

Closed dcreager closed 12 months ago

dcreager commented 12 months ago

This patch uses build metadata to export the directory containing the include files for the copy of Lua that is built. This allows downstream crates that use the Lua C API to use the same include files that are used to build Lua itself in this crate, by reading from the DEP_LUA_INCLUDE environment variable.

jcmoyer commented 12 months ago

LGTM, however I would recommend using one of the other lua binding crates as I haven't kept up with rust so I'm unable to review many patches properly.

dcreager commented 12 months ago

LGTM, however I would recommend using one of the other lua binding crates as I haven't kept up with rust so I'm unable to review many patches properly.

Thanks for the quick turnaround, and understood re your recommendation. I had looked at mlua and rlua, but they seem to be attempting to add too much "magic" to the bindings; I appreciated your approach of providing an API that's still very similar to the underlying Lua C API, but with some Rust niceties. I'll see if I can get something similar out of the other crates.