fix(x509-tsp): add proper no-std support #1939
Open
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.
x509-tsp: Add proper no-std support
Summary
The
x509-tsp
crate does not properly support no-std environments, despite being part of the RustCrypto ecosystem where no-std support is a core principle. Even when usingdefault-features = false
, the crate forces std features on its dependencies, making it unusable in embedded systems, WASM, and other no-std environments.Current Behavior
When adding
x509-tsp
as a dependency withdefault-features = false
:The dependency tree shows that std features are still enabled:
Expected Behavior
The crate should respect
default-features = false
and work in no-std environments, following the pattern established by other RustCrypto crates.Root Cause
Looking at the
Cargo.toml
(both v0.1.0 and current master), the dependencies are declared withoutdefault-features = false
:Note that only
x509-cert
properly usesdefault-features = false
.