Skip to content

Installation

This guide covers all installation methods for Alopex DB.

System Requirements

Requirement Minimum Recommended
Rust 1.75+ 1.90+ (toolchain)
Memory 256 MB 1 GB+
Disk 100 MB Depends on data
OS Linux, macOS, Windows Linux (Ubuntu 22.04+)

Installation Methods

As a Library (Embedded Mode)

Add Alopex to your Rust project:

[dependencies]
alopex-embedded = "0.1"

# Optional: Enable vector support
alopex-embedded = { version = "0.1", features = ["vectors"] }
cargo add alopex-embedded

# With vector support
cargo add alopex-embedded --features vectors

From Source

Clone and build from source:

# Clone the repository
git clone https://github.com/alopex-db/alopex.git
cd alopex

# Build all crates
cargo build --release

# Run tests
cargo test

# Install CLI tools (optional)
cargo install --path alopex-cli

Feature Flags

Feature Description Default
vectors Enable vector storage and search ❌
compression Enable data compression ✅
metrics Prometheus metrics export ❌
tracing Distributed tracing support ❌
[dependencies]
alopex-embedded = { version = "0.1", features = ["vectors", "metrics"] }

Platform-Specific Notes

Linux

No additional dependencies required. For optimal performance:

# Increase file descriptor limits
ulimit -n 65536

# Enable huge pages (optional, for large datasets)
sudo sysctl -w vm.nr_hugepages=1024

macOS

Works out of the box with Xcode Command Line Tools:

xcode-select --install

Windows

Requires Visual Studio Build Tools:

  1. Download Visual Studio Build Tools
  2. Install "Desktop development with C++"
  3. Restart terminal and build

WebAssembly

For browser deployments:

# Install wasm-pack
cargo install wasm-pack

# Build for WASM
wasm-pack build --target web alopex-wasm

Verifying Installation

# Check version
alopex --version

# Run built-in tests
alopex test

# Quick benchmark
alopex bench --quick

Troubleshooting

Build fails with 'linker not found'

Install the C toolchain for your platform:

  • Ubuntu/Debian: sudo apt install build-essential
  • macOS: xcode-select --install
  • Windows: Install Visual Studio Build Tools
Out of memory during build

Reduce parallel jobs:

cargo build --release -j 2
Permission denied on Linux

Check file system permissions:

# Data directory needs write access
chmod 755 /path/to/data

Next Steps