You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
maybe is better to wait for key-wallet-manager to get merged into key-wallet
Summary by CodeRabbit
Breaking Changes
The library now requires the Rust standard library and no longer supports no_std environments. Previously optional error trait implementations are now always available, and some conditional functionality is now unconditionally compiled.
This pull request systematically migrates the key-wallet crate family from alloc-based imports and no_std-compatible conditional compilation to unconditional std imports. It removes the std feature alias from Cargo configuration, inlines default feature dependencies, eliminates #[cfg(feature = "std")] guards from error and trait implementations, and replaces scattered alloc::* imports with std::* equivalents throughout the codebase.
Updated feature flags: key-wallet removes the std feature and inlines its dependencies into default. Dependents (ffi, manager) now rely on default features instead of explicit default-features = false + features = ["std"].
Switched BTreeMap from alloc::collections to std::collections. Changed current_timestamp() from conditional std/no_std behavior to always use std::time::SystemTime::now() with unwrap_or_default().
Consolidated imports from alloc::* to std::collections and removed unused alloc::{string::String, vec::Vec} imports. Simplified GetKey implementations by removing #[cfg(feature = "std")] gating. Updated test module imports.
Wallet Metadata and Config key-wallet/src/wallet/metadata.rs, key-wallet/src/wallet/root_extended_keys.rs, key-wallet/src/wallet/initialization.rs
Switched collection and string types from alloc::{borrow::Cow, collections::BTreeMap, string::String} to std equivalents.
Wallet Info Submodules key-wallet/src/wallet/managed_wallet_info/mod.rs, key-wallet/src/wallet/managed_wallet_info/wallet_info_interface.rs, key-wallet/src/wallet/managed_wallet_info/coin_selection.rs, key-wallet/src/wallet/managed_wallet_info/transaction_builder.rs, key-wallet/src/wallet/managed_wallet_info/helpers.rs
Removed unused alloc::{string::String, vec::Vec} imports. Switched BTreeSet from alloc to std. Removed feature gating from error trait implementations.
Removed unused alloc::{string::String, vec::Vec, ToString} imports. Updated collection type sources from alloc to std.
Estimated code review effort
🎯 4 (Complex) | ⏱️ ~55 minutes
Poem
🐰 From alloc we hop to std, a grand migration,
No features to gate, just one configuration,
Error traits now shine unconditionally bright,
The wallet is standard, our systems feel light!
✨
🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name
Status
Explanation
Resolution
Docstring Coverage
⚠️ Warning
Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%.
Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name
Status
Explanation
Title check
✅ Passed
The title accurately summarizes the main objective of the PR: removing no-std support from the key-wallet crate, which aligns with the extensive changes across the codebase.
Description Check
✅ Passed
Check skipped - CodeRabbit’s high-level summary is enabled.
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing Touches📝 Generate docstrings
Create stacked PR
Commit on current branch
🧪 Generate unit tests (beta)
Create PR with unit tests
Commit unit tests in branch chore/drop-nostd-supp-key-wallet
📝 Coding Plan
Generate coding plan for human review comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.11%. Comparing base (665bb7b) to head (eb5b21b). ⚠️ Report is 1 commits behind head on v0.42-dev.
This PR has merge conflicts with the base branch. Please rebase or merge the base branch into your branch to resolve them.
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
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.
maybe is better to wait for key-wallet-manager to get merged into key-wallet
Summary by CodeRabbit
no_stdenvironments. Previously optional error trait implementations are now always available, and some conditional functionality is now unconditionally compiled.