Skip to content

Comments

chore: disable default feature of http client#331

Open
joe-p wants to merge 2 commits intomainfrom
chore/disable_default_client
Open

chore: disable default feature of http client#331
joe-p wants to merge 2 commits intomainfrom
chore/disable_default_client

Conversation

@joe-p
Copy link
Collaborator

@joe-p joe-p commented Jan 31, 2026

No description provided.

@joe-p joe-p force-pushed the chore/disable_default_client branch from fa313b5 to 979b5fd Compare January 31, 2026 21:10
@joe-p joe-p marked this pull request as ready for review January 31, 2026 21:10
@joe-p joe-p requested a review from lempira as a code owner January 31, 2026 21:10
Copilot AI review requested due to automatic review settings January 31, 2026 21:10
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR makes the HTTP client dependency more configurable by disabling the algokit_http_client crate’s default feature set in the consumer clients and aligning the generated templates with this behavior.

Changes:

  • Disable algokit_http_client default features in algod_client, indexer_client, kmd_client, and the Rust OAS generator Cargo template, while still enabling the ffi_uniffi feature explicitly.
  • Gate DefaultHttpClient imports and the convenience constructors (testnet, mainnet, localnet) behind the default_client feature in all concrete clients and the generator template, ensuring they are only compiled when the feature is enabled.
  • Ensure future generated Rust clients follow the same feature-gated pattern for using DefaultHttpClient.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.

Show a summary per file
File Description
crates/algod_client/src/apis/client.rs Conditionally imports DefaultHttpClient and keeps convenience constructors behind the default_client feature so the crate can build without the default HTTP client.
crates/algod_client/Cargo.toml Disables algokit_http_client default features while wiring in ffi_uniffi, relying on the crate’s own default_client feature to opt into the default HTTP client when desired.
crates/indexer_client/src/apis/client.rs Mirrors the conditional DefaultHttpClient import and feature-gated constructors for the Indexer client.
crates/indexer_client/Cargo.toml Disables algokit_http_client default features for the Indexer client dependency while keeping ffi_uniffi enabled.
crates/kmd_client/src/apis/client.rs Applies the same default_client feature gating to DefaultHttpClient usage and constructors in the KMD client.
crates/kmd_client/Cargo.toml Disables algokit_http_client default features for the KMD client dependency and preserves ffi_uniffi.
api/oas_generator/rust_oas_generator/templates/base/Cargo.toml.j2 Updates the generated Cargo template so new clients also depend on algokit_http_client with default features disabled and ffi_uniffi explicitly enabled.
api/oas_generator/rust_oas_generator/templates/apis/client.rs.j2 Adjusts the client template to conditionally import DefaultHttpClient and gate generated convenience constructors behind the default_client feature.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant