Skip to content

Add Chapter 4: Content-Addressable Data#3

Merged
hartsock merged 1 commit into
ch03-traits-and-genericsfrom
ch04-content-addressable
Apr 28, 2026
Merged

Add Chapter 4: Content-Addressable Data#3
hartsock merged 1 commit into
ch03-traits-and-genericsfrom
ch04-content-addressable

Conversation

@hartsock

Copy link
Copy Markdown
Member

Summary

  • Builds content-addressable data from first principles: BLAKE3 hashing, deterministic serialization (serde), ContentAddressable trait, content-addressed store, verified retrieval, composable Merkle-style addressing
  • Maps Python's hashlib, json.dumps(sort_keys=True), and @dataclass(frozen=True) to Rust equivalents
  • Teaches why content-addressing matters: integrity, dedup, caching, provenance, concurrency safety
  • 17 passing example tests, 5 exercises building a mini CAS

Test plan

  • cargo test -p ch04-content-addressable — 17/17 pass
  • cargo clippy --workspace -- -D warnings — clean
  • cargo fmt --all -- --check — clean
  • No private repo references (audited)

Depends on #2

🤖 Generated with Claude Code

Builds the concept of content-addressable data from first principles:
BLAKE3 hashing, deterministic serialization with serde, a ContentAddressable
trait with default methods, a content-addressed store with deduplication,
verified retrieval, and composable Merkle-style content addressing.

17 passing example tests, 5 exercises building a mini CAS system from
scratch (hash function, trait definition, Config implementation,
content-addressed cache, and Merkle-chain snapshots).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@hartsock hartsock mentioned this pull request Apr 13, 2026
4 tasks
@hartsock hartsock merged commit ffdb2b7 into ch03-traits-and-generics Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant