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

Link to custom libcurl on macOS #522

Open
jcamiel opened this issue Aug 10, 2023 · 0 comments
Open

Link to custom libcurl on macOS #522

jcamiel opened this issue Aug 10, 2023 · 0 comments

Comments

@jcamiel
Copy link
Contributor

jcamiel commented Aug 10, 2023

I'm trying to test HTTP3 with curl-rust on macOS, so I want to link against a custom version of libcurl (that supports HTTP3).

In

if cfg!(feature = "force-system-lib-on-osx") && target.contains("apple") {
return println!("cargo:rustc-flags=-l curl");

there is a feature flag force-system-lib-on-osx that forces system libcurl linking.

Few lines after:

if target.contains("apple") && (!cfg!(feature = "http2") || curl_config_reports_http2()) {
return println!("cargo:rustc-flags=-l curl");
}

If target is macOS with system curl supporting HTTP2 (like recent version Ventura for instance), we force also system libcurl linking.

It seems to me that no matter force-system-lib-on-osx, we always link to system libcurl on macOS, which seems a bug to me.

Note: I successfully link to a custom libcurl supporting HTTP3 by removing

if target.contains("apple") && (!cfg!(feature = "http2") || curl_config_reports_http2()) {
return println!("cargo:rustc-flags=-l curl");
}
and relies on pkg-config code path.
For building a custom libcurl supporting HTTP3, I've used the brew formulae https://github.com/cloudflare/homebrew-cloudflare with brew install --HEAD -s curl.rb

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