rad-feed
A flexible Rust library for processing Radicle collaborative objects (patches and issues) with pluggable storage backends.
Overview
rad-feed processes operations from patches and issues across Radicle repositories and stores them using your choice of storage backend. Instead of being tied to a specific database, the library uses a trait-based approach that allows you to implement any storage system you need.
Features
- Storage Agnostic: Implement the
FeedStoragetrait to use any storage backend - Incremental Processing: Only processes new operations since the last run
- Multi-repository Support: Process COB operations across all delegate repositories
- Action Deduplication: Built-in mechanisms to prevent duplicate processing
- Author Resolution: Automatic author information resolution using Radicle aliases
Implementing Custom Storage
The core of the library is the FeedStorage trait. Implement this trait to use any storage system:
use HashMap;
use ;
use ;
use ActionEntry;
Architecture
Core Components
FeedStorageTrait (src/storage/mod.rs): The main abstraction for storage backendsFeedProcessor(src/feed.rs): Processes repositories and manages the storage lifecycleActionEntry(src/entry.rs): The core data structure representing COB operations- Built-in Storages: SQLite and in-memory implementations
Action Data Structure
Each ActionEntry contains:
operation_id: Unique identifier of the COB operation (Git OID)cob_id: Collaborative Object ID (patch or issue ID)rid: Repository ID where the action occurredtimestamp: When the action was performedaction: Serialized action data (JSON string)author: Author information with DID and optional aliastypename: Typename of the COB (e.g. "xyz.radicle.patch" or "xyz.radicle.issue")