Anda Object Store
Anda Object Store is a Rust library that extends the functionality of the object_store crate with additional features like metadata management and encryption. It's designed to work seamlessly with Anda DB, providing enhanced storage capabilities for AI applications.
Features
MetaStore
MetaStore is a wrapper around an ObjectStore implementation that adds metadata capabilities:
- Metadata Management: Stores metadata for each object in a separate location
- Conditional Updates: Enables conditional updates for storage backends that don't natively support them (like
LocalFileSystem) - Metadata Caching: Reduces storage operations with configurable caching
- Content Hashing: Automatically generates E-Tags (SHA3-256 hashes) for stored content
use MetaStoreBuilder;
use LocalFileSystem;
// Create a MetaStore with a local filesystem backend
let storage = new
.build;
EncryptedStore
EncryptedStore provides transparent AES-256-GCM encryption and decryption for stored objects:
- Transparent Encryption: Automatically encrypts data before storage and decrypts upon retrieval
- Chunked Encryption: Handles large objects by splitting them into manageable chunks
- Metadata Caching: Improves performance with configurable caching
- Conditional Put Operations: Optional optimistic concurrency control
use EncryptedStoreBuilder;
use LocalFileSystem;
// Create a secret key (in production, use a secure random key)
let secret = ;
// Create an encrypted store with a local filesystem backend
let store = new_with_prefix.unwrap;
let encrypted_store = with_secret
.with_chunk_size // Set chunk size to 1 MB
.with_conditional_put // Enable conditional put operations
.build;
Integration with Anda DB
Anda Object Store is designed to work seamlessly with Anda DB, providing the storage layer for this specialized database for AI Agents:
use ;
use EncryptedStoreBuilder;
use LocalFileSystem;
// Create a secret key (in production, use a secure random key)
let secret = ;
// Create an encrypted store with a local filesystem backend
let object_store = new_with_prefix.unwrap;
let object_store = with_secret
.with_chunk_size // Set chunk size to 1 MB
.with_conditional_put // Enable conditional put operations
.build;
// Configure and connect to Anda DB
let db_config = DBConfig ;
// Connect to the database using the object store
let db = connect.await?;
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
License
Copyright © 2025 LDC Labs.
ldclabs/anda-db is licensed under the MIT License. See LICENSE for the full license text.