Skip to content

Make it possible to use it as rust dependency for a crate that builds a bundled version of a c-lib depending on openssl #78

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

Open
weiznich opened this issue May 29, 2025 · 0 comments

Comments

@weiznich
Copy link

This is rather a long shot feature request. I maintain pq-src, which is a crate bundling the libpq C source code and building + linking it as part of your cargo build process. libpq depends on openssl for TLS encrypted connections. I currently solve that by letting pq-src depend on openssl-src (which statically links openssl) and extracting the relevant information about the include directory from the environment variables they set like this. I would like to be able to do the same thing with rustls-openssl-compant to eliminate the usage of openssl in my dependency tree.

As far as I see that would require:

  • Having rustls-openssl-compat be published on crates.io, so that other crates can depend on it. This would then build + link the crate into the final binary, which should export the "right" symbols as far as I can tell
  • Make sure that rustls-openssl-compat provides a header file + exposes the location of that header file via an environment variable to other build scripts (See the cargo documentation on this feature here (search for DEP_)
  • Likely add support for functions that are used by libpq and that are currently missing from rustls-openssl-compat, but that's secondary, as I would like to get your opinion on this idea first
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