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

Tracking how *-sys crates use pkg-config and vcpkg #7

Open
weihanglo opened this issue Apr 25, 2024 · 7 comments
Open

Tracking how *-sys crates use pkg-config and vcpkg #7

weihanglo opened this issue Apr 25, 2024 · 7 comments

Comments

@weihanglo
Copy link
Collaborator

This is an issue tracking usages of pkg-config and vcpkg in common *-sys crates.

By having a better understanding of how they are used, we could come up with a common declarative interface covering most use cases.

@weihanglo
Copy link
Collaborator Author

weihanglo commented Apr 25, 2024

curl-sys

pkg-config

  • Calls when probing
    • pkg_config::Config::cargo_metadata(true)
  • Prints one cargo:include={path} instruction per include paths.
  • Risks

vcpkg

@weihanglo
Copy link
Collaborator Author

weihanglo commented Apr 25, 2024

libgit2-sys

pkg-config

  • Calls:
    • pkg_config::Config::range_version("1.7.2".."1.8.0")
  • Prints one cargo:root={path} instruction per include paths.
  • Risks: None

vcpkg

None.

@weihanglo
Copy link
Collaborator Author

weihanglo commented Apr 25, 2024

openssl-sys

pkg-config

vcpkg

@weihanglo
Copy link
Collaborator Author

libssh2-sys

pkg-config

vcpkg

@weihanglo
Copy link
Collaborator Author

zstd-sys

pkg-config

  • Calls:
    • pkg_config::Config::statik(true)
    • pkg_config::Config::cargo_metadata(!cfg!(feature = "non-cargo"))
  • Prints cargo:include={} with ;-joined include paths
  • Risks: None

vcpkg

None

@weihanglo
Copy link
Collaborator Author

weihanglo commented Apr 25, 2024

lzma-sys

pkg-config

  • Calls: nothing special
  • Prints nothing. Only when vendoring will it print cargo:include={} with a local path.
  • Risks:
    • There is a note that on MSVC if we use pkg-config, it may accidentally pick up lib from MingW, which is not desired.

vcpkg

None

@weihanglo
Copy link
Collaborator Author

libz-sys

pkg-config

vcpkg

  • Calls:
    • vcpkg::Config::emit_includes(true)
  • Risks:

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

No branches or pull requests

1 participant