houseabsolute / ubi

The Universal Binary Installer
Apache License 2.0
191 stars 6 forks source link

tls features #62

Closed jdx closed 2 months ago

jdx commented 3 months ago

I'd like some configurability within ubi in regards to the tls library used—basically just deferring to reqwest's features. Here is how I did it in mise:

https://github.com/jdx/mise/blob/de5d26b053f39a8033417ee08c2c401613000b86/Cargo.toml#L146-L150

In your case, I think this addition to Config.toml would work:

[features]
native-tls = ["reqwest/native-tls"]
rustls = ["reqwest/rustls-tls"]
rustls-native-roots = ["reqwest/rustls-tls-native-roots"]

The reason for this is I can then use the same features in mise to allow mise users to configure the tls library in both mise and ubi without the need to install potentially native-tls and rustls side by side—cutting down on # of crates as well as providing more flexibility. Also, I've found that some users have trouble using different tls libraries so making it configurable will help them.

autarch commented 2 months ago

I released 0.1.2 with a set of features to pick which tls implementation to use. It defaults to rustls, since I've found it much easier to get builds working across platforms with that.

jdx commented 2 months ago

that's fine, I can configure mise to just not use the default features of ubi. Thanks for getting this in!