Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR simplifies the documentation configuration attributes for hazmat features by removing redundant references to the generic hazmat feature, keeping only the specific granular features (hazmat-crypto and hazmat-address). This change guides users toward best practices by exposing only the minimal necessary hazmat APIs in documentation.
- Removes
any(feature = "hazmat", feature = "hazmat-crypto")in favor of justfeature = "hazmat-crypto"in doc attributes - Removes
any(feature = "hazmat", feature = "hazmat-address")in favor of justfeature = "hazmat-address"in doc attributes - Maintains backward compatibility as the generic
hazmatfeature still enables all sub-features for compilation
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| soroban-sdk/src/env.rs | Simplified doc cfg for crypto_hazmat() method to show only hazmat-crypto feature |
| soroban-sdk/src/crypto.rs | Simplified doc cfg for CryptoHazmat struct to show only hazmat-crypto feature |
| soroban-sdk/src/address_payload.rs | Simplified module-level doc cfg to show only hazmat-address feature |
| soroban-sdk/src/address.rs | Simplified doc cfg for to_payload() and from_payload() methods to show only hazmat-address feature |
mootz12
approved these changes
Dec 15, 2025
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.
What
Remove
hazmatfeature from doc cfg attributes, keeping only the specifichazmat-addressandhazmat-cryptofeatures in documentation.Before
After
Why
The generic
hazmatfeature is used for compilation gating, but really only exists historically for backwards compatibility and as something used for testing during development of the SDK. Generally folks should use the narrower scoped hazmat features, so showing it in documentation guides folks to do the not best practice, which results in enabling more hazmat APIs than are necessary.