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

Add rustls-tls, native-tls features #38

Merged
merged 2 commits into from
May 19, 2022
Merged

Add rustls-tls, native-tls features #38

merged 2 commits into from
May 19, 2022

Conversation

sei0o
Copy link
Contributor

@sei0o sei0o commented May 14, 2022

This PR is to let postgrest-rs indirectly choose users which TLS implementation to use. reqwest makes use of OpenSSL by default, which is painful for cross-compiling. In that case, enabling rustls-tls feature often comes in handy.

This PR does basically the same thing what another did in oauth2 crate.

@soedirgo
Copy link
Collaborator

Thanks! What do you think about simply using reqwest with rustls instead of introducing feature flags? I don't think the current usage depends on the OpenSSL dependency.

@sei0o
Copy link
Contributor Author

sei0o commented May 17, 2022

Technically, if a package (indirectly) depend only on either native-tls or rustls-tls, it can reduce its final executable size a bit since Cargo can strip out code for the other implementation. But that's a minor point and I think adopting rustls-tls is fine.

@sei0o sei0o closed this May 17, 2022
@sei0o
Copy link
Contributor Author

sei0o commented May 17, 2022

Tapped the wrong button by mistake...

@sei0o sei0o reopened this May 17, 2022
@soedirgo
Copy link
Collaborator

Gotcha, in that case let's just use reqwest with rustls-only for now?

@sei0o
Copy link
Contributor Author

sei0o commented May 18, 2022

Yes, I've pushed another commit which tells reqwest to use rustls.

@soedirgo soedirgo merged commit 1534c7d into supabase-community:master May 19, 2022
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

Successfully merging this pull request may close these issues.

2 participants