| Crates.io | amaters-core |
| lib.rs | amaters-core |
| version | 0.1.0 |
| created_at | 2026-01-19 00:43:35.194168+00 |
| updated_at | 2026-01-19 00:43:35.194168+00 |
| description | Core kernel for AmateRS - Fully Homomorphic Encrypted Database |
| homepage | https://github.com/cool-japan/amaters |
| repository | https://github.com/cool-japan/amaters |
| max_upload_size | |
| id | 2053395 |
| size | 600,751 |
Core kernel for AmateRS - Fully Homomorphic Encrypted Database
amaters-core is the foundational crate of AmateRS, providing the core infrastructure for encrypted data storage and computation. It implements the Iwato (storage) and Yata (compute) components of the AmateRS architecture.
| Module | Description |
|---|---|
error |
Error types and recovery strategies |
types |
Core types (CipherBlob, Key, Query) |
traits |
Storage engine trait definitions |
storage |
Storage implementations (Iwato) |
compute |
FHE execution engine (Yata) |
validation |
Input validation helpers |
amaters-core
├── Iwato (Storage Engine)
│ ├── Memory Storage (MVP)
│ ├── LSM-Tree (TODO)
│ ├── WAL (TODO)
│ └── WiscKey vLog (TODO)
└── Yata (Compute Engine)
├── Circuit Compiler (TODO)
├── Optimizer (TODO)
└── FHE Executor (TODO)
use amaters_core::{
storage::MemoryStorage,
traits::StorageEngine,
types::{CipherBlob, Key},
};
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let storage = MemoryStorage::new();
// Store encrypted data
let key = Key::from_str("user:123");
let encrypted = CipherBlob::new(vec![1, 2, 3, 4, 5]);
storage.put(&key, &encrypted).await?;
// Retrieve
let retrieved = storage.get(&key).await?;
assert_eq!(retrieved, Some(encrypted));
Ok(())
}
use amaters_core::types::{QueryBuilder, Predicate, col};
let query = QueryBuilder::new("users")
.filter(Predicate::Eq(col("age"), encrypted_age));
use amaters_core::{error::Result, error_context};
fn risky_operation() -> Result<()> {
if condition {
return Err(AmateRSError::ValidationError(
error_context!("Invalid input")
));
}
Ok(())
}
default - Includes storage and computestorage - Enable storage enginecompute - Enable FHE compute engine (requires tfhe-rs)parallel - Enable parallel operations with Rayonmmap - Enable memory-mapped storagegpu - Enable GPU accelerationcuda - Enable CUDA backend (requires gpu)metal - Enable Metal backend (requires gpu)tfhe - Fully Homomorphic Encryption (optional)tokio - Async runtimerkyv - Zero-copy serializationdashmap - Concurrent HashMapoxicode instead of bincode (Pure Rust)# Run unit tests
cargo test
# Run with all features
cargo test --all-features
# Run benchmarks
cargo bench
See CONTRIBUTING.md for development guidelines.
Licensed under either of:
at your option.
COOLJAPAN OU (Team KitaSan)