Feat: Add feature to replace openssl with rusttls #682
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Allows to build without openssl.
Default feature settings will use openssl.
You can build without openssl via
cd helix-cli && cargo build --no-default-features --features normal-rustlsSelf update can not be build without openssl, so this functionality is disabled then.
Closes #
Checklist when merging to main
rustfmthelix-cli/Cargo.tomlandhelixdb/Cargo.tomlAdditional Notes
Greptile Overview
Updated On: 2025-11-05 17:55:10 UTC
Greptile Summary
This PR introduces optional OpenSSL support to HelixDB, allowing users to build the entire project using rustls as an alternative TLS backend. The changes implement a feature flag system across all workspace crates (
helix-cli,helix-db,helix-container,metrics, andhql-tests) that maintains backward compatibility by defaulting to OpenSSL while enabling rustls builds via--no-default-features --features normal-rustls. The implementation properly handles the trade-off that self-update functionality must be disabled in rustls builds since it has hard OpenSSL dependencies, providing clear error messages to users when this feature is unavailable.The changes follow Rust conventions for optional dependencies and feature propagation, ensuring consistent TLS backend usage across the dependency chain. Documentation is updated in the README to guide users on building with rustls.
Important Files Changed
Sequence Diagram
sequenceDiagram participant User participant CLI as "Helix CLI" participant Cargo as "Cargo Build System" participant Features as "Feature Resolution" participant TLS as "TLS Provider" participant SelfUpdate as "Self Update Module" User->>CLI: "cargo build --no-default-features --features normal-rustls" CLI->>Cargo: "Parse build command with features" Cargo->>Features: "Resolve feature flags" alt rustls-tls feature enabled Features->>TLS: "Initialize rustls-tls provider" TLS-->>Features: "rustls TLS configured" Features->>SelfUpdate: "Check self_update feature" Note over SelfUpdate: "self_update feature disabled" SelfUpdate-->>Features: "Self-update unavailable" else default-tls feature enabled Features->>TLS: "Initialize OpenSSL provider" TLS-->>Features: "OpenSSL TLS configured" Features->>SelfUpdate: "Check self_update feature" Note over SelfUpdate: "self_update feature enabled" SelfUpdate-->>Features: "Self-update available" end Features-->>Cargo: "Feature resolution complete" Cargo->>CLI: "Build with resolved features" CLI-->>User: "Build complete with TLS provider" alt User runs helix update with rustls build User->>CLI: "helix update" CLI->>SelfUpdate: "run(force)" SelfUpdate-->>CLI: "Error: Self-update not available" CLI-->>User: "Self-update disabled with rustls build" else User runs helix update with OpenSSL build User->>CLI: "helix update" CLI->>SelfUpdate: "run(force)" SelfUpdate->>SelfUpdate: "Check GitHub for updates" SelfUpdate-->>CLI: "Update completed" CLI-->>User: "Update successful" endContext used:
dashboard- readme for helixdb (source)dashboard- Main documentation for all of HelixDB, the SDKs, HelixQL, and the Helix CLI (source)