Skip to content

Commit 550a282

Browse files
docs: add module-level docs to 11 crates
1 parent b50649d commit 550a282

File tree

11 files changed

+52
-2
lines changed
  • crates
    • uselesskey-bdd-steps/src
    • uselesskey-core-cache/src
    • uselesskey-core-factory/src
    • uselesskey-core-hash/src
    • uselesskey-core-id/src
    • uselesskey-core-keypair-material/src
    • uselesskey-core-kid/src
    • uselesskey-core-negative/src
    • uselesskey-core-seed/src
    • uselesskey-feature-grid/src
    • uselesskey-interop-tests/src

11 files changed

+52
-2
lines changed

crates/uselesskey-bdd-steps/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
#![forbid(unsafe_code)]
2+
//! Cucumber BDD step definitions for uselesskey integration testing.
3+
//!
4+
//! Implements Given/When/Then steps that exercise the full uselesskey API
5+
//! across all key types, adapters, and negative fixture scenarios.
26
37
use cucumber::{World, given, then, when};
48
#[cfg(feature = "uk-jwt")]

crates/uselesskey-core-cache/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#![forbid(unsafe_code)]
22
#![cfg_attr(not(feature = "std"), no_std)]
3+
//! Identity-keyed typed cache primitives for uselesskey fixture factories.
4+
//!
5+
//! Provides a concurrent, identity-based cache that stores generated cryptographic
6+
//! artifacts keyed by `(domain, label, spec, variant)` tuples. This avoids
7+
//! expensive re-generation (especially RSA) across test runs.
38
49
extern crate alloc;
510

@@ -8,8 +13,6 @@ use alloc::collections::BTreeMap;
813
use alloc::sync::Arc;
914
use core::any::Any;
1015
use core::fmt;
11-
12-
#[cfg(feature = "std")]
1316
use dashmap::DashMap;
1417
#[cfg(not(feature = "std"))]
1518
use spin::Mutex;

crates/uselesskey-core-factory/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#![forbid(unsafe_code)]
22
#![cfg_attr(not(feature = "std"), no_std)]
3+
//! Factory orchestration and cache lookup for uselesskey fixtures.
4+
//!
5+
//! Implements the core `Factory` type that manages deterministic derivation,
6+
//! caching, and artifact generation. Operates in either Random or Deterministic
7+
//! mode based on seed configuration.
38
49
extern crate alloc;
510

crates/uselesskey-core-hash/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
#![forbid(unsafe_code)]
22
#![cfg_attr(not(feature = "std"), no_std)]
3+
//! Length-prefixed hashing helpers for deterministic fixture derivation.
4+
//!
5+
//! Wraps BLAKE3 to provide collision-resistant, deterministic digests used
6+
//! throughout the `uselesskey` workspace for seed derivation and artifact identity.
37
48
pub use blake3::{Hash, Hasher};
59

crates/uselesskey-core-id/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#![forbid(unsafe_code)]
22
#![cfg_attr(not(feature = "std"), no_std)]
3+
//! Core identity and derivation primitives for uselesskey.
4+
//!
5+
//! Defines `ArtifactId` — the `(domain, label, spec_fingerprint, variant,
6+
//! derivation_version)` tuple that uniquely identifies each generated artifact.
7+
//! Provides deterministic seed derivation from a master seed and artifact id.
38
49
extern crate alloc;
510

crates/uselesskey-core-keypair-material/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#![forbid(unsafe_code)]
2+
//! PKCS#8 / SPKI key-material helpers shared by key fixture crates.
3+
//!
4+
//! Provides the `Pkcs8SpkiKeyMaterial` trait and related types for consistent
5+
//! access to private (PKCS#8) and public (SPKI) key encodings in PEM and DER
6+
//! formats, plus corrupt PEM/DER negative fixture support.
27
38
use std::fmt;
49
use std::sync::Arc;

crates/uselesskey-core-kid/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#![forbid(unsafe_code)]
2+
//! Deterministic key-id (kid) helpers for uselesskey fixture crates.
3+
//!
4+
//! Generates URL-safe base64 key identifiers by hashing public key material
5+
//! with BLAKE3. The default prefix length (12 bytes / 96 bits) provides
6+
//! sufficient collision resistance for test fixture scenarios.
27
38
use base64::Engine as _;
49
use base64::engine::general_purpose::URL_SAFE_NO_PAD;

crates/uselesskey-core-negative/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#![forbid(unsafe_code)]
22
#![cfg_attr(not(feature = "std"), no_std)]
3+
//! Negative fixture builders for PEM/DER corruption.
4+
//!
5+
//! Re-exports and extends `uselesskey-core-negative-pem` with DER truncation
6+
//! and corruption helpers. Used by key-type crates to generate intentionally
7+
//! broken artifacts for error-handling tests.
38
49
extern crate alloc;
510

crates/uselesskey-core-seed/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#![forbid(unsafe_code)]
22
#![cfg_attr(not(feature = "std"), no_std)]
3+
//! Seed parsing and redaction primitives for uselesskey.
4+
//!
5+
//! Provides the [`Seed`] type that wraps 32 bytes of entropy used for
6+
//! deterministic fixture derivation. Implements `Debug` with redaction
7+
//! to prevent accidental leakage of seed material in logs.
38
49
extern crate alloc;
510

crates/uselesskey-feature-grid/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#![forbid(unsafe_code)]
2+
//! Canonical feature and matrix definitions for uselesskey automation.
3+
//!
4+
//! Defines `FeatureSet` entries consumed by `cargo xtask feature-matrix` to
5+
//! drive the CI feature-combination matrix. Each entry specifies a stable
6+
//! label and the corresponding Cargo CLI arguments.
27
38
/// Canonical matrix entry used by automation.
49
#[derive(Debug, Clone, Copy, PartialEq, Eq)]

0 commit comments

Comments
 (0)