IzwiIzwi

Build from Source

Build Izwi from source for development or to customize your installation.

Prerequisites

All Platforms

  • Git — Version control
  • Rust — 1.83 or later (stable)
  • Node.js — 18+ (for UI development)

macOS

# Install Xcode Command Line Tools xcode-select --install # Install Rust curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source "$HOME/.cargo/env"

Linux (Ubuntu/Debian)

sudo apt update sudo apt install -y build-essential curl git pkg-config libssl-dev # Install Rust curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh source "$HOME/.cargo/env"

Windows

  1. Install Visual Studio Build Tools
    • Select "Desktop development with C++"
  2. Install Rust
  3. Install Git

Clone the Repository

git clone https://github.com/agentem-ai/izwi.git cd izwi

Build

Standard Build

cargo build --release

macOS with Metal Acceleration

cargo build --release --features metal

Linux/Windows with CUDA

cargo build --release --features cuda

Install UI Dependencies

The web UI requires Node.js:

cd ui npm install cd ..

Build the UI (Optional)

To bundle the UI with the server:

cd ui npm run build cd ..

Install CLI Tools

Using the Install Script

./scripts/install-cli.sh

This installs to ~/.local/bin:

  • izwi — Main CLI
  • izwi-server — API server
  • izwi-desktop — Desktop application

Manual Installation

# Create directory mkdir -p ~/.local/bin # Copy binaries cp target/release/izwi ~/.local/bin/ cp target/release/izwi-server ~/.local/bin/ cp target/release/izwi-desktop ~/.local/bin/ # Add to PATH (add to ~/.bashrc or ~/.zshrc) export PATH="$HOME/.local/bin:$PATH"

Development Mode

Run Server in Dev Mode

cargo run --bin izwi-server

Run UI in Dev Mode

In a separate terminal:

cd ui npm run dev

The dev UI runs at http://localhost:5173 and proxies API requests to the server.

Run with Hot Reload

# Install cargo-watch cargo install cargo-watch # Run with auto-reload cargo watch -x "run --bin izwi-server"

Project Structure

izwi/ ├── crates/ │   ├── izwi-cli/      # CLI application │   ├── izwi-core/     # Core inference engine │   ├── izwi-server/   # HTTP API server │   └── izwi-desktop/  # Tauri desktop app ├── ui/                # React web interface ├── docs/              # Documentation ├── scripts/           # Build and install scripts └── data/              # Sample data files

Running Tests

# Run all tests cargo test # Run specific crate tests cargo test -p izwi-core # Run with output cargo test -- --nocapture

Building Release Packages

macOS DMG

cd crates/izwi-desktop cargo tauri build

Output: target/release/bundle/dmg/Izwi_*.dmg

Linux DEB

cd crates/izwi-desktop cargo tauri build

Output: target/release/bundle/deb/izwi_*.deb

Windows Installer

cd crates/izwi-desktop cargo tauri build

Output: target/release/bundle/nsis/Izwi_*-setup.exe


Troubleshooting

Rust version too old

rustup update stable rustup default stable

Missing OpenSSL (Linux)

sudo apt install -y libssl-dev pkg-config

Metal not available (macOS)

Ensure you're on Apple Silicon and macOS 12.0+:

uname -m  # Should show "arm64"

CUDA build fails

Ensure CUDA toolkit is installed and nvcc is in PATH:

nvcc --version

Next Steps