Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Developer Setup

Follow these steps to configure your local environment and build MindSafe from source.

1. Install the Rust Toolchain

MindSafe requires the stable Rust compiler and cargo (Rust’s build system and package manager).

  • Universal Install:
    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
    
  • Verification: Ensure your installation is active by checking the version:
    rustc --version
    

2. System Dependencies

Depending on your operating system, you will need specific libraries to compile the egui interface and the SQLite backend.

Linux (Ubuntu/Debian)

You need the GTK, SSL, and SQLite development headers:

sudo apt update
sudo apt install -y libgtk-3-dev libssl-dev libsqlite3-dev pkg-config build-essential

macOS

Ensure you have the Xcode Command Line Tools installed:

xcode-select --clt

Windows

You must have the C++ Build Tools installed via the Visual Studio Installer. Select the “Desktop development with C++” workload during installation.

3. Clone the Repository

git clone https://github.com/aryawork-com/MindSafe.git
cd mindsafe

4. Building and Running

Development Build

To run the application in debug mode (faster compilation, slower execution):

cargo run

Release Build

To generate the optimized, production-ready binary:

cargo build --release

The resulting binary will be located at ./target/release/mindsafe (or mindsafe.exe on Windows).

5. Documentation (mdBook)

MindSafe uses mdBook for its documentation. To contribute to the docs:

  1. Install mdBook:
    cargo install mdbook
    
  2. Navigate to the docs folder:
    cd docs
    
  3. Serve locally:
    mdbook serve --open
    
    This will start a local server at http://localhost:3000 that live-reloads as you edit the markdown files.

🧪 Running Tests

We maintain a suite of unit tests for the cryptographic logic and database operations.

cargo test

🛠️ Code Quality

Before submitting a Pull Request, please ensure your code follows the project’s formatting and linting standards:

# Format the code
cargo fmt

# Run the linter
cargo clippy -- -D warnings