High-performance implementation of plcbundle written in Rust
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: add module-level documentation comments to all source files

Add descriptive module-level documentation comments to clearly explain the purpose and functionality of each module in the codebase. This improves code discoverability and maintainability.

+20 -1
+1
src/cache.rs
··· 1 + //! In-memory cache for bundle operations with simple capacity-based eviction 1 2 // src/cache.rs 2 3 use crate::operations::Operation; 3 4 use std::collections::HashMap;
+1
src/constants.rs
··· 1 + //! Global constants and helpers for filenames/paths, networking defaults, compression, index settings, and position conversions 1 2 // Constants for version and binary identification 2 3 use std::path::{Path, PathBuf}; 3 4
+1
src/did_index.rs
··· 1 + //! Memory-mapped DID index with 256 shards and delta segments; packed `OpLocation` encodes global position and nullified flag; supports build, verify, repair, and sampling 1 2 // Simplified DID Index implementation matching Go version 2 3 use crate::constants; 3 4 use anyhow::{Context, Result};
+1
src/ffi.rs
··· 1 + //! C-compatible FFI surface exposing BundleManager and related types for integration from other languages 1 2 use crate::constants; 2 3 use crate::manager::*; 3 4 use crate::operations::*;
+1
src/format.rs
··· 1 + //! Formatting helpers for bytes, durations, rates, and numbers used across CLI/server/library components 1 2 // Shared formatting helpers used across CLI/server/library components. 2 3 3 4 use chrono::Duration as ChronoDuration;
+1
src/handle_resolver.rs
··· 1 + //! AT Protocol handle resolver client using XRPC; includes validation and normalization helpers 1 2 // Handle resolver - resolves AT Protocol handles to DIDs via XRPC 2 3 3 4 use crate::constants;
+1
src/index.rs
··· 1 + //! Bundle repository index: load/save, sequence validation, and rebuild from bundle metadata 1 2 // Replace your current src/index.rs with this: 2 3 3 4 use anyhow::Result;
+1
src/iterators.rs
··· 1 + //! Iterators for traversing bundles and operations: range iteration and streaming export 1 2 // src/iterators.rs 2 3 use crate::manager::{BundleManager, ExportSpec, LoadOptions, QuerySpec}; 3 4 use crate::operations::{Operation, OperationFilter};
+1
src/manager.rs
··· 1 + //! High-level manager orchestrating loading, random access, DID resolution, querying/export, sync, verification, rollback/migration, and mempool management 1 2 // src/manager.rs 2 3 use crate::constants::{self, bundle_position_to_global, total_operations_from_bundles}; 3 4 use crate::index::{BundleMetadata, Index};
+1
src/mempool.rs
··· 1 + //! Persistent pre-bundle operation store with strict chronological validation, CID deduplication, incremental saving, and fast DID lookups 1 2 // src/mempool.rs 2 3 use crate::constants; 3 4 use crate::operations::Operation;
+1
src/operations.rs
··· 1 + //! Core PLC operation model backed by `sonic_rs`; preserves raw JSON for deterministic hashing; includes filters, requests, and location wrapper 1 2 // src/operations.rs 2 3 use serde::{Deserialize, Serialize}; 3 4 use sonic_rs::{self, Value};
+1
src/options.rs
··· 1 + //! Processor options and builder, including `QueryMode` for simple path vs JMESPath queries 1 2 use std::path::PathBuf; 2 3 3 4 /// Configuration options for the PLC bundle processor
+1
src/plc_client.rs
··· 1 + //! Rate-limited HTTP client for PLC directory: fetch operations and DID documents with retries/backoff and token-bucket limiting 1 2 // PLC Client - HTTP client for interacting with PLC directory APIs 2 3 use crate::constants; 3 4 use crate::resolver::DIDDocument;
+1
src/processor.rs
··· 1 + //! Query engine and processor supporting simple path and JMESPath queries with parallel bundle processing and batched output 1 2 use crate::constants; 2 3 use crate::index::Index; 3 4 use crate::options::{Options, QueryMode};
+1 -1
src/remote.rs
··· 1 - // Remote access module for fetching data from remote plcbundle instances 1 + //! Remote client for plcbundle instances: fetch index, bundles, operations, and DID documents; includes local index loader and URL normalization 2 2 // This module is for fetching from other plcbundle repositories, not from PLC directory 3 3 use crate::constants; 4 4 use crate::index::Index;
+1
src/resolver.rs
··· 1 + //! DID resolution: build PLC DID state and convert to W3C DID Documents; handles legacy fields and endpoint normalization 1 2 // DID Resolution - Convert PLC operations to W3C DID Documents 2 3 use crate::operations::Operation; 3 4 use anyhow::Result;
+1
src/runtime.rs
··· 1 + //! Graceful shutdown coordination for server and background tasks, with unified shutdown future and fatal-error handling 1 2 // Runtime module - shutdown coordination for server and background tasks 2 3 use tokio::signal; 3 4 use tokio::sync::watch;
+2
src/sync.rs
··· 1 + 2 + //! PLC synchronization: events and logger, boundary-CID deduplication, one-shot and continuous modes, and robust error/backoff handling 1 3 2 4 // Sync module - PLC directory synchronization 3 5 use crate::constants;
+1
src/verification.rs
··· 1 + //! Bundle and chain verification: fast metadata checks, compressed/content hash validation, operation count checks, and parent/cursor linkage 1 2 // src/verification.rs 2 3 use crate::bundle_format; 3 4 use crate::constants;