Add [package.metadata.system-deps] to mlua-sys/Cargo.toml#660
Add [package.metadata.system-deps] to mlua-sys/Cargo.toml#660slowsage wants to merge 2 commits intomlua-rs:mainfrom
Conversation
fbf5646 to
39c9bd8
Compare
| cc = "1.0" | ||
| cfg-if = "1.0" | ||
| pkg-config = "0.3.17" | ||
| system-deps = "7.0" |
There was a problem hiding this comment.
Distro packager hat on here. How exactly does the system-deps crate go about determining if the appropriate headers and sources are installed on a host system? If this isn't using pkg-config under the hood somewhere (it may be) then this feels like a regression. If it's just an ergonomic wrapper around the same tooling that's probably fine, but it it is some bespoke hand rolled detection system this would be a huge red flag.
There was a problem hiding this comment.
There are two separate changes - adding metadata for parsing by any tool (easier than going through code) and one to use the added metadata for pkg-config's probe() calls:
- First commit: Specifying dependencies in
Cargo.tomlin a way that can be parsed. This is for any bespoke tools - no code change, only metadata added to Cargo.toml. Figured the format fromsystem-depscan be reused (as in the second commit, described below). This commit is enough for ci tools to parse and figure out which pkgs to install. - Second commit: Once we specify in
Cargo.toml, we might as well switch tosystem-depsinmlua-sysitself.Cargo.tomlofsystem-depscrate usespkg-config.
It explicitly usespkg-configunder the hood here.
For my use case, the first commit is enough but system-deps can use it to call pkg-config's probe() and we can avoid repeating the same info in the code, hence the second commit.
Please let me know if I missed something.
|
Its ready now. Removed Can make it one commit instead if that is better. |
Will help in ci environments to know which system dependency to install based on feature.