# How to Build Meetily from Source with Automatic GPU Detection on Linux

> Build Meetily from source on Linux with automatic GPU detection for optimal hardware accelerated speech recognition. Follow our guide to compile with the right flags.

- Repository: [Zackriya Solutions/meetily](https://github.com/Zackriya-Solutions/meetily)
- Tags: how-to-guide
- Published: 2026-07-17

---

**Meetily's build script automatically detects NVIDIA, AMD, or Vulkan-capable GPUs at compile time and suggests the optimal feature flags for hardware-accelerated speech recognition.**

Meetily is an open-source meeting transcription application built with Rust and Tauri. When compiling from source on Linux, the build system inspects your hardware configuration and recommends the appropriate GPU backend for the Whisper-rs speech recognition engine, eliminating manual configuration guesswork.

## Understanding the GPU Detection Architecture

Meetily employs a two-layer detection strategy that operates at both compile time and runtime. According to the source code in `Zackriya-Solutions/meetily`, the **hardware detection logic** resides in two key locations within the `frontend/src-tauri` directory.

### Compile-Time Detection in build.rs

The **[`build.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/build.rs)** script at [`frontend/src-tauri/build.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/build.rs) (lines 24-73) executes before the main compilation begins. It probes the system for GPU drivers by checking for the presence of command-line utilities:

- **`nvidia-smi`** for NVIDIA CUDA GPUs
- **`rocm-smi`** for AMD ROCm GPUs
- **`libvulkan.so`** for Vulkan-compatible devices

When the script detects a GPU, it emits Cargo warnings that guide your next steps. For example, if `nvidia-smi` is present, the build outputs:

```

🎯 NVIDIA GPU detected! Consider rebuilding with --features cuda

```

If no GPU is found, it suggests CPU-only compilation with the `openblas` feature.

### Runtime Hardware Probing in hardware_detector.rs

The **[`hardware_detector.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/hardware_detector.rs)** file at [`frontend/src-tauri/src/audio/hardware_detector.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/src/audio/hardware_detector.rs) (lines 60-71) handles runtime configuration. It evaluates environment variables such as `CUDA_PATH`, `CUDA_HOME`, and `/usr/local/cuda` for NVIDIA devices, or `VULKAN_SDK` for Vulkan libraries. 

This module calculates a **`PerformanceTier`** based on CPU core count, available GPU memory, and system RAM. The tier determines the Whisper model size and threading configuration used by the transcription engine in [`frontend/src-tauri/src/whisper_engine/whisper_engine.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/src/whisper_engine/whisper_engine.rs).

## Prerequisites for Building Meetily on Linux

Before compiling, install the system-level drivers that the detection scripts look for:

- **NVIDIA**: CUDA toolkit (provides `nvidia-smi`)
- **AMD**: ROCm platform (provides `rocm-smi`)
- **Intel/Other**: Vulkan loader (`libvulkan1` on Debian/Ubuntu)

Install build dependencies:

```bash
sudo apt-get update
sudo apt-get install -y build-essential pkg-config libssl-dev libvulkan1

```

For NVIDIA systems, ensure the CUDA toolkit is in your `PATH`:

```bash
export PATH=/usr/local/cuda/bin:$PATH

```

## Step-by-Step Build Instructions

### Initial Clone and Setup

Clone the repository containing the detection logic:

```bash
git clone https://github.com/Zackriya-Solutions/meetily.git
cd meetily/frontend/src-tauri

```

### Running the Auto-Detect Build

Execute a plain release build to trigger the detection script:

```bash
cargo build --release

```

The **[`build.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/build.rs)** script will inspect your system and print warnings indicating which feature flag to use. Common outputs include:

- `💡 For NVIDIA GPU: cargo build --release --features cuda`
- `💡 For AMD GPU: cargo build --release --features hipblas`
- `💡 For other GPUs: cargo build --release --features vulkan`

### Rebuilding with GPU Acceleration

Re-run the build command with the suggested feature flag. For an NVIDIA system:

```bash
cargo build --release --features cuda

```

For AMD GPUs, use:

```bash
cargo build --release --features hipblas

```

For Vulkan-compatible devices (including Intel ARC or compatible AMD cards):

```bash
cargo build --release --features vulkan

```

The available features are defined in [`frontend/src-tauri/Cargo.toml`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/Cargo.toml) and include `cuda`, `vulkan`, `hipblas`, `metal` (macOS), `coreml` (macOS), and `openblas` (CPU).

## Automated One-Line Build Script

To eliminate manual steps, create a shell script that replicates the detection logic and automatically appends the correct feature flag:

```bash
#!/usr/bin/env bash
set -euo pipefail

# Detect GPU and select feature

if command -v nvidia-smi >/dev/null 2>&1; then
    FEATURES="cuda"
elif command -v rocm-smi >/dev/null 2>&1; then
    FEATURES="hipblas"
elif ldconfig -p | grep -q libvulkan.so; then
    FEATURES="vulkan"
else
    FEATURES="openblas"
fi

echo "Detected GPU feature: $FEATURES"
cargo build --release --features "$FEATURES"

```

Save this as [`build-meetily.sh`](https://github.com/Zackriya-Solutions/meetily/blob/main/build-meetily.sh), make it executable with `chmod +x build-meetily.sh`, and run it to perform a fully automated build that respects your hardware configuration.

## Troubleshooting GPU Detection

**No GPU detected despite having NVIDIA hardware:**
Ensure `nvidia-smi` is in your `PATH`. The detection script specifically looks for this binary; merely having the driver installed is insufficient if the tool is not accessible.

**AMD GPU not recognized:**
Install `rocm-smi` and ensure it is executable from the shell. The [`build.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/build.rs) script checks for this binary at lines 40-50.

**Vulkan detection fails:**
Run `ldconfig -p | grep vulkan` to verify `libvulkan.so` is registered. If missing, install the Vulkan loader package for your distribution.

**PerformanceTier calculation seems incorrect:**
The [`hardware_detector.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/hardware_detector.rs) module reads `/proc/cpuinfo` and `/proc/meminfo` on Linux. Ensure your user has read permissions for these files.

## Summary

- **Automatic detection** occurs in [`frontend/src-tauri/build.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/frontend/src-tauri/build.rs), which checks for `nvidia-smi`, `rocm-smi`, or `libvulkan.so` before compilation.
- **Feature flags** (`cuda`, `hipblas`, `vulkan`) are defined in [`Cargo.toml`](https://github.com/Zackriya-Solutions/meetily/blob/main/Cargo.toml) and enable specific GPU backends in Whisper-rs.
- **Runtime optimization** is handled by [`hardware_detector.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/hardware_detector.rs), which calculates a `PerformanceTier` to configure the transcription engine.
- **CPU-only fallback** uses the `openblas` feature when no GPU is detected.
- **Single-command builds** are possible by scripting the detection logic around the `cargo build --release` command.

## Frequently Asked Questions

### Does Meetily support AMD GPUs on Linux?

Yes. Meetily supports AMD GPUs through the ROCm platform. When `rocm-smi` is detected in your system path, the [`build.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/build.rs) script suggests the `hipblas` feature flag. Rebuild with `cargo build --release --features hipblas` to enable hardware acceleration on AMD Radeon and Instinct cards.

### What if my GPU is not detected during the build process?

If the automatic detection fails, manually specify the appropriate feature flag based on your hardware. Use `--features cuda` for NVIDIA, `--features hipblas` for AMD, or `--features vulkan` for Intel and other Vulkan-compatible devices. The CPU-only `openblas` feature works on any Linux system without GPU drivers.

### Can I build Meetily from source without a GPU?

Yes. The build system automatically falls back to CPU-only mode when no GPU drivers are detected. Run `cargo build --release` without feature flags, or explicitly add `--features openblas` to force a CPU-based build using OpenBLAS for matrix operations. The [`hardware_detector.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/hardware_detector.rs) module will configure the Whisper engine for CPU-only inference.

### Which Linux distributions are compatible with Meetily's automatic GPU detection?

The detection scripts work on any Linux distribution that provides standard environment variables and `/proc` filesystem access. The [`build.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/build.rs) script uses standard Unix commands to check for driver binaries, while [`hardware_detector.rs`](https://github.com/Zackriya-Solutions/meetily/blob/main/hardware_detector.rs) reads `/proc/cpuinfo` and `/proc/meminfo`. Ubuntu, Debian, Fedora, and Arch Linux are explicitly supported, provided you install the CUDA, ROCm, or Vulkan packages specific to your distribution's package manager.