Skip to content

Conversation

@ValuedMammal
Copy link
Contributor

@ValuedMammal ValuedMammal commented Oct 31, 2025

Description

This PR is meant to streamline the handling of feature flags in the library, in particular by removing the Client's dependency on the proxy feature and overall simplifying the feature gating logic. Additionally, we move away from the old use-* feature naming convention by introducing simpler feature names, remove the unused minimal feature, and get rid of conditional compilation for debug-calls while retaining the ability to atomically count calls made.

fixes #91
fixes #42

Before, the `client` module was gated on the "proxy" feature,
which caused unnecessary coupling since proxy is only
required for the Socks5 client type.

This change removes the client module's dependency on the "proxy"
feature in favor of more precise feature gating of the Socks5 client
type and related functions calling into the `socks` module.

Note that `Client` still requires a TLS backend to be enabled
by one of "use-openssl", "use-rustls" or "use-rustls-ring".
The "default" feature argument is redundant and
unclear, as it requires the developer to know
which aspects of the default features apply to a
particular cfg attribute. This change simplifies
feature gating logic by only requiring the features
necessary to build with a given feature set.
Introduce simpler feature names "openssl", "rustls",
and "rustls-ring". The original "use-" style names
are still available for backwards compatibility.
Removes conditional compilation of
`ElectrumApi::calls_made`. As a result
the `debug-calls` feature flag is also removed.
@ValuedMammal ValuedMammal changed the title wip: Clean up "proxy" feature Clean up proxy feature Nov 5, 2025
@ValuedMammal ValuedMammal marked this pull request as ready for review November 8, 2025 17:27
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.

Client is only exported when proxy feature is enabled. Rename use-rustls and use-openssl features

2 participants