-
-
Notifications
You must be signed in to change notification settings - Fork 188
Add [package.metadata.system-deps] to mlua-sys/Cargo.toml #660
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
base: main
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.