Technical Stack
MindSafe is built using a modern, systems-oriented stack that prioritizes memory safety, cryptographic integrity, and local performance, we ensure a lightweight footprint and a reduced attack surface.
Core Development
- Language: Rust
- Chosen for its “fearless concurrency” and memory safety guarantees. Rust eliminates common vulnerabilities such as buffer overflows and null pointer dereferences, which are critical for security-sensitive software.
- GUI Framework: egui / eframe
- An immediate-mode GUI library for Rust. It provides a highly responsive, hardware-accelerated interface. Because it is written in pure Rust, it allows for easy cross-platform compilation without heavy external dependencies.
Security & Cryptography
- Encryption Algorithm: XChaCha20-Poly1305
- A high-speed, stream-based authenticated encryption (AEAD) cipher. It is resistant to nonce-reuse issues and side-channel attacks, making it a robust choice for modern application security.
- Password Hashing: Argon2id
- Used for key derivation. Argon2id is the industry standard for protecting against GPU/ASIC-based brute-force attacks by utilizing memory-hard functions.
- Cryptography Provider: RustCrypto
- We utilize pure-Rust implementations of cryptographic primitives to ensure that our security stack is as transparent and auditable as the rest of our codebase.
Data Storage
- Database: SQLite
- The backend engine for every Workbook. SQLite is a serverless, zero-configuration, ACID-compliant database. Each Workbook is a standalone
.dbfile, ensuring complete data portability and reliability.
- The backend engine for every Workbook. SQLite is a serverless, zero-configuration, ACID-compliant database. Each Workbook is a standalone
- Interface: rusqlite
- A high-level, ergonomic wrapper for using SQLite within Rust, ensuring type safety and efficient query execution.
Documentation & Tooling
- Documentation: mdBook
- Our official documentation (including this page) is built using mdBook. This allows us to write documentation in Markdown and deploy it as a fast, searchable, and clean static site.
- Build System: Cargo
- The Rust package manager and build tool. It manages our dependencies and ensures reproducible builds across Windows, macOS, and Linux.
Technical Architecture Overview
The interaction between these components follows a strict isolation principle:
- UI Layer (egui): Handles user input and markdown rendering.
- Logic Layer (Rust): Manages state and triggers cryptographic operations.
- Security Layer (Argon2id/XChaCha20): Encrypts/Decrypts data in memory.
- Persistence Layer (SQLite): Writes the encrypted ciphertext to the local disk.