lib

Core libraries for Radroots
git clone https://radroots.dev/git/lib.git
Log | Files | Refs | README

commit b67960ff3d076da140e14154e81f5719ccc82c89
parent 16b2e43b1ed2a1e5b6248f2a8636596c3a0dcb7c
Author: triesap <tyson@radroots.org>
Date:   Mon, 27 Jul 2026 18:00:41 +0000

identity: align package manifest and module root

- add the approved account, key, profile, and username module topology
- keep legacy identity and storage behavior explicitly std-gated during migration
- make the no-default package shell portable on host and wasm targets
- align package metadata while preserving the publication freeze

Diffstat:
MCargo.lock | 2+-
Mcrates/identity/Cargo.toml | 17+++++++++++------
Acrates/identity/src/account.rs | 4++++
Acrates/identity/src/key.rs | 4++++
Mcrates/identity/src/lib.rs | 9++++++++-
Acrates/identity/src/profile.rs | 4++++
6 files changed, 32 insertions(+), 8 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock @@ -4566,7 +4566,7 @@ dependencies = [ "serde", "serde_json", "tempfile", - "thiserror 1.0.69", + "thiserror 2.0.18", "tracing", "zeroize", ] diff --git a/crates/identity/Cargo.toml b/crates/identity/Cargo.toml @@ -6,7 +6,7 @@ edition.workspace = true authors.workspace = true rust-version.workspace = true license.workspace = true -description = "Identity model for Radroots" +description = "Public identity and account value types for Radroots" repository.workspace = true homepage.workspace = true documentation = "https://docs.rs/radroots-identity" @@ -18,9 +18,14 @@ name = "radroots_identity" [features] default = ["std", "json-file", "nip49"] std = [ + "dep:nostr", "dep:radroots_protected_store", "dep:radroots_runtime_paths", "dep:radroots_secret_vault", + "dep:serde", + "dep:serde_json", + "dep:thiserror", + "dep:tracing", ] json-file = ["std", "dep:radroots_runtime"] nip49 = ["std", "nostr/nip49"] @@ -36,12 +41,12 @@ radroots_runtime_paths = { workspace = true, optional = true } radroots_secret_vault = { workspace = true, optional = true, features = [ "std", ] } -nostr = { workspace = true } +nostr = { workspace = true, optional = true } secrecy = { workspace = true, optional = true } -serde = { workspace = true } -serde_json = { workspace = true } -thiserror = { workspace = true } -tracing = { workspace = true } +serde = { workspace = true, optional = true } +serde_json = { workspace = true, optional = true } +thiserror = { version = "2", default-features = false, optional = true } +tracing = { workspace = true, optional = true } zeroize = { workspace = true, optional = true } [dev-dependencies] diff --git a/crates/identity/src/account.rs b/crates/identity/src/account.rs @@ -0,0 +1,4 @@ +//! Public account value types. +//! +//! The canonical account identifiers and records are introduced by the +//! ordered identity migration steps. diff --git a/crates/identity/src/key.rs b/crates/identity/src/key.rs @@ -0,0 +1,4 @@ +//! Canonical public-key value types. +//! +//! The canonical public-key and identity identifier definitions are +//! introduced by the ordered identity migration steps. diff --git a/crates/identity/src/lib.rs b/crates/identity/src/lib.rs @@ -5,18 +5,25 @@ #[cfg(not(feature = "std"))] extern crate alloc; +pub mod account; +#[cfg(feature = "std")] pub mod error; +#[cfg(feature = "std")] pub mod identity; +pub mod key; +pub mod profile; #[cfg(feature = "std")] pub mod storage; pub mod username; +#[cfg(feature = "std")] pub use error::IdentityError; +#[cfg(feature = "std")] pub use identity::{ DEFAULT_IDENTITY_PATH, RadrootsIdentity, RadrootsIdentityFile, RadrootsIdentityId, RadrootsIdentityProfile, RadrootsIdentityPublic, RadrootsIdentitySecretKeyFormat, }; -#[cfg(feature = "nip49")] +#[cfg(all(feature = "std", feature = "nip49"))] pub use identity::{ RadrootsIdentityEncryptedSecretKeyOptions, RadrootsIdentityEncryptedSecretKeySecurity, }; diff --git a/crates/identity/src/profile.rs b/crates/identity/src/profile.rs @@ -0,0 +1,4 @@ +//! Public, transport-neutral profile value types. +//! +//! The canonical profile definitions are introduced by the ordered identity +//! migration steps.