Open
Conversation
Otherwise the default http client is always being pulled in
fa313b5 to
979b5fd
Compare
Contributor
There was a problem hiding this comment.
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_clientdefault features inalgod_client,indexer_client,kmd_client, and the Rust OAS generator Cargo template, while still enabling theffi_uniffifeature explicitly. - Gate
DefaultHttpClientimports and the convenience constructors (testnet,mainnet,localnet) behind thedefault_clientfeature 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.