Open
Conversation
There was a problem hiding this comment.
Pull request overview
Adds initial no_std compatibility knobs to the keetanetwork-crypto and keetanetwork-utils crates by introducing std feature flags, switching to alloc types, and adjusting dependency feature sets to support no_std builds.
Changes:
- Add
#![no_std]undercfg_attr+allocusage acrosskeetanetwork-cryptomodules. - Introduce
stdfeature defaults forkeetanetwork-utilsandkeetanetwork-crypto, and adjust dependencies todefault-features = falsewhere needed. - Update lockfile to reflect dependency feature/version resolution changes.
Reviewed changes
Copilot reviewed 18 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| keetanetwork-utils/src/lib.rs | Adds no_std cfg gating at crate level. |
| keetanetwork-utils/Cargo.toml | Adds std feature + changes defaults; modifies [lib] configuration. |
| keetanetwork-crypto/src/lib.rs | Adds no_std gating and extern crate alloc for alloc-backed types/macros. |
| keetanetwork-crypto/src/utils.rs | Switches String/Vec imports to alloc equivalents. |
| keetanetwork-crypto/src/operations/signature.rs | Uses alloc::vec::Vec for no_std. |
| keetanetwork-crypto/src/operations/encryption.rs | Uses alloc::vec::Vec for no_std. |
| keetanetwork-crypto/src/kdf.rs | Uses alloc::vec::Vec for no_std. |
| keetanetwork-crypto/src/hash.rs | Uses alloc::vec::Vec for no_std. |
| keetanetwork-crypto/src/error.rs | Switches error strings to alloc::string::String. |
| keetanetwork-crypto/src/algorithms/mod.rs | Uses alloc::vec::Vec and adjusts signature encoding import for no_std. |
| keetanetwork-crypto/src/algorithms/secp256r1.rs | Uses alloc::vec::Vec for no_std. |
| keetanetwork-crypto/src/algorithms/secp256k1.rs | Uses alloc::vec::Vec for no_std. |
| keetanetwork-crypto/src/algorithms/ed25519.rs | Uses alloc::vec::Vec for no_std. |
| keetanetwork-crypto/src/algorithms/ecies.rs | Uses alloc::vec::Vec for no_std. |
| keetanetwork-crypto/src/algorithms/aes_gcm.rs | Uses alloc::vec::Vec for no_std. |
| keetanetwork-crypto/src/algorithms/aes_ctr.rs | Uses alloc::vec::Vec for no_std. |
| keetanetwork-crypto/src/algorithms/aes_cbc.rs | Uses alloc::vec::Vec for no_std. |
| keetanetwork-crypto/Cargo.toml | Reworks dependency features for no_std and introduces std/alloc features. |
| Cargo.lock | Updates resolved dependencies per feature/version changes. |
💡 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.



Summary
no_stdsupport for the crypto crateno_stdsupport for the utils crate