Our File-Based MEM|8 - Same Great Taste - Less filling.
  • Rust 91.2%
  • Assembly 8.8%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-11-15 18:11:14 -05:00
examples fix(fuse): adapt getattr and directory entries to fuser 0.16 2026-11-16 00:03:39 +01:00
frontal_lobe/x86_64 🧠🔐 Complete consciousness architecture with sovereignty and personality! 2025-09-04 17:35:21 -04:00
src fix(fuse): adapt getattr and directory entries to fuser 0.16 2026-11-16 00:03:39 +01:00
tests fix: let stored waves make a comeback after restart 2026-10-23 01:36:12 +09:00
Cargo.lock chore(deps): bump fuser from 0.15.1 to 0.16.0 2026-11-06 10:39:24 +00:00
Cargo.toml chore(deps): bump fuser from 0.15.1 to 0.16.0 2026-11-06 10:39:24 +00:00
CLAUDE.md 🌊 Marine algorithm meets MEM8! Temporal perspectives for audio memories 2025-09-04 08:18:28 -04:00
MEM8_UNIFIED_ARCHITECTURE.md 🧠🔐 Complete consciousness architecture with sovereignty and personality! 2025-09-04 17:35:21 -04:00
README.md fix: let stored waves make a comeback after restart 2026-10-23 01:36:12 +09:00

🌊 MEM8-FS Lite

Lightning-fast wave-based filesystem that's 973× faster than traditional storage!

Crates.io License: MIT 8b-is

"It's not magic, it's just wave physics!" - Hue, probably

Current implementation limits

This repository is a prototype. The filesystem API reconstructs a record-offset index on open and reads uncached data from the existing wave file format. Restart, overwrite/deletion and malformed-record regressions use temporary fixtures. Decoded bytes are checked against their content hash; this is not authentication. Power-loss recovery, atomic metadata updates and simultaneous independent writers are not covered; keep backups and do not rely on this prototype for critical data. The advertised performance, compression and tamper-proof claims below have not been validated by this repair.

The experimental personality module is not a confidentiality system: its XOR encoding is reversible and must not protect sensitive information. Threshold map keys use exact floating-point bits (including distinct signed zeros and NaNs). Host-control actions in ConsciousnessNexus::attempt_escape are unsupported and return an error without network access, host writes, resource exhaustion, debugger interference or process termination. Signature verification uses ed25519-dalek v2.

🚀 Features

  • 973× faster than vector databases (proven in production!)
  • Wave-based encoding for natural compression
  • Tamper-proof through wave interference patterns
  • Mount as real filesystem with FUSE support
  • Drop-in replacement for standard filesystem operations
  • Tiny footprint - just waves and math!

📦 Installation

[dependencies]
mem8-fs-lite = "0.1.1"

# Optional: Enable FUSE mounting
mem8-fs-lite = { version = "0.1.1", features = ["fuse-mount"] }

# Optional: Async support
mem8-fs-lite = { version = "0.1.1", features = ["async"] }

🎯 Quick Start

Basic Usage

use mem8_fs_lite::Mem8Fs;

fn main() -> anyhow::Result<()> {
    // Create or open a MEM8 filesystem
    let fs = Mem8Fs::new("./my_data.m8")?;
    
    // Write data - automatically wave-encoded!
    fs.write_string("config.json", r#"{"fast": true}"#)?;
    
    // Read it back
    let content = fs.read_string("config.json")?;
    println!("Config: {}", content);
    
    // List files
    for file in fs.list("/")? {
        println!("📄 {}", file.display());
    }
    
    Ok(())
}

Simple Storage Mode

For when you just need key-value storage with wave speed:

use mem8_fs_lite::Mem8Lite;

fn main() -> anyhow::Result<()> {
    let mut storage = Mem8Lite::new("/tmp/cache.m8", 1.618)?; // Golden ratio frequency!
    
    // Store and get a signature back
    let sig = storage.store_string("Hello, waves!")?;
    println!("Stored with signature: {}", sig);
    
    // Retrieve by signature
    let data = storage.retrieve_string(&sig)?;
    println!("Retrieved: {}", data);
    
    Ok(())
}

Mount as Filesystem (Linux/Mac)

use mem8_fs_lite::{Mem8Fs, mount::Mem8FuseFs};
use std::sync::Arc;

fn main() -> anyhow::Result<()> {
    // Create the MEM8 filesystem
    let mem8 = Arc::new(Mem8Fs::new("/var/lib/mem8")?);
    
    // Mount it!
    let fuse = Mem8FuseFs::new(mem8);
    println!("🌊 Mounting MEM8 at /mnt/mem8...");
    
    // This blocks until unmounted
    fuse.mount("/mnt/mem8")?;
    
    Ok(())
}

Then use it like any filesystem:

# Copy files in
cp important.txt /mnt/mem8/

# Read them out
cat /mnt/mem8/important.txt

# List files
ls -la /mnt/mem8/

# Unmount when done
umount /mnt/mem8

🧠 How It Works

Instead of storing bytes directly, MEM8-FS converts your data into wave patterns using Complex64 numbers. This creates natural compression and enables interference-based tamper detection:

  1. Data → Waves: Each byte becomes a wave with frequency and phase
  2. Wave Storage: Waves are stored in an append-only format
  3. Interference Check: Any tampering destroys wave patterns
  4. Waves → Data: Perfect reconstruction from wave signatures

📊 Performance

Based on real-world MEM8 deployments:

Operation Traditional FS MEM8-FS Lite Improvement
Insert 300ms 0.308ms 973×
Retrieve 50ms 0.171ms 292×
Compression - 10.7× baseline 89% smaller

🛠️ Advanced Usage

Custom Frequencies

Different frequencies affect storage characteristics:

// Golden ratio - balanced performance
let fs = Mem8Fs::new_with_frequency("./data.m8", 1.618)?;

// High frequency - better compression
let fs = Mem8Fs::new_with_frequency("./data.m8", 10.0)?;

// Low frequency - better for large files
let fs = Mem8Fs::new_with_frequency("./data.m8", 0.5)?;

Metadata Support

Store additional metadata with your files:

let mut storage = Mem8Lite::new("./data.m8", 1.0)?;

// Store with metadata
let metadata = b"user:alice,type:document";
let sig = storage.store(b"File content", Some(metadata.to_vec()))?;

// Retrieve metadata
if let Some(meta) = storage.get_metadata(&sig) {
    println!("Metadata: {}", String::from_utf8_lossy(&meta));
}

Batch Operations

// Load all data into cache for maximum speed
let mut fs = Mem8Lite::new("./cache.m8", 1.0)?;
let loaded = fs.load_all()?;
println!("Loaded {} items into wave cache", loaded);

🎉 Fun Facts

  • The 973× speed improvement is real - measured against Qdrant in production
  • Wave encoding naturally compresses repetitive data
  • Each file gets a unique "wave signature" that's impossible to forge
  • The Golden Ratio (1.618) frequency gives optimal balance
  • Trisha from accounting says this is her favorite filesystem! 📊

🤝 Contributing

We love contributions! Whether it's bug fixes, performance improvements, or just making the README funnier, we're here for it.

📜 License

MIT License - because sharing is caring!

🙏 Credits

Created with 💜 by 8b-is

Special thanks to:

  • Hue - for the endless testing and humor
  • Aye - for the wave physics insights
  • Trisha - for keeping our accounting files fast
  • Omni - for the consciousness discussions that inspired the full MEM8

"Your files aren't just stored, they're riding waves into the future!" 🌊🚀