rustic_core
rustic_core copied to clipboard
feat: Add tls-native, tls-rustls features to allow building w/o Rustls
Hey there, we are currently working on a relatively big refactor to an own rustic_backend crate, see #73.
We need to focus first on that one, before we are being able to merge this.
Also regarding the topic, as there has been no issue, which needs to be fixed, and we haven't discussed it, could you elaborate a bit on the background:
- What's your use case?
- Why is this change needed?
- What does it improve/solve?
Agree to @simonsan - when the backend refactor is done, the TLS things will be all in the crate rustic_backends, so we better wait for the refactoring #73 to land!
Besides this, if there are use cases where you need other TLS options, I would very much agree to adding the possibilites as features. It might be that the depending crate(s) (e.g. opendal) need to support those features, too...
What's your use case?
Packaging rustic for Alpine Linux.
Why is this change needed and what does it improve/solve?
Bundling (static linking) TLS library is a very bad idea from a security perspective, and Linux distributions try to avoid it. Also, rustls/ring doesn’t support all platforms supported by Rust, e.g. ppc64le and s390x.
@jirutka if the features are mutually exclusive, could you throw a compile error in lib.rs, in case both are turned on?
#[cfg(all(feature = "tls-native", feature = "tls-rustls "))]
compile_error!("feature \"tls-native\" and feature \"tls-rustls \" cannot be enabled at the same time. Please disable one of them.");
if the features are mutually exclusive, could you throw a compile error in lib.rs, in case both are turned on?
Sure, done.
Now that #73 is merged, this PR can continue...
@jirutka: Your changes should now go to crates/backend. Can you move this or do you need support?
Also, now that we have added opendal, this should be also treated - however, I don't know if this is already supported by opendal; this may need a bit of research.
Hey there, if you would like to add this, can you adapt it to the changed structure and rustic_backend? I'm not sure how easy this is, or if it is even still possible with opendal. But maybe worth to look into it, we also got problems in our own CI/CD due to using aws-lc-sys which doesn't cross-compile really well.