Skip to content

Feature: Initial no_std Support for Crypto#7

Open
sephynox wants to merge 6 commits intomainfrom
feat/no_std-support
Open

Feature: Initial no_std Support for Crypto#7
sephynox wants to merge 6 commits intomainfrom
feat/no_std-support

Conversation

@sephynox
Copy link
Collaborator

@sephynox sephynox commented Mar 5, 2026

Summary

  • Adds no_std support for the crypto crate
  • Adds no_std support for the utils crate

@sephynox sephynox requested review from Copilot and ezraripps March 5, 2026 23:11
@sephynox sephynox self-assigned this Mar 5, 2026
@sephynox sephynox added the enhancement New feature or request label Mar 5, 2026
Copy link

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

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] under cfg_attr + alloc usage across keetanetwork-crypto modules.
  • Introduce std feature defaults for keetanetwork-utils and keetanetwork-crypto, and adjust dependencies to default-features = false where 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.

@sephynox sephynox requested a review from mamonet March 6, 2026 20:50
@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 6, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants