Meetily GPU Acceleration: How to Build with CUDA, Vulkan, or Metal Support

Meetily supports three GPU acceleration backends—Metal for macOS, CUDA for NVIDIA GPUs on Windows/Linux, and Vulkan for AMD/Intel on Linux—controlled via Cargo feature flags at build time.

Meetily’s transcription engine leverages Rust-based Whisper integration to offload inference from CPU to GPU. By compiling the appropriate backend feature into the Tauri desktop application, you can significantly reduce transcription latency depending on your hardware platform.

Available GPU Acceleration Backends in Meetily

The whisper_engine crate in frontend/src-tauri/src/whisper_engine/acceleration.rs abstracts three hardware acceleration APIs:

  • Metal + Core ML: Automatically enabled on macOS 13+ builds with no additional Cargo flags required.
  • CUDA: NVIDIA GPU support for Windows and Linux, enabled via the cuda feature flag.
  • Vulkan: Cross-platform graphics API for AMD/Intel GPUs on Linux, enabled via the vulkan feature flag.

Each backend implementation lives in the acceleration module, providing a unified interface that maps to device-specific inference engines.

Build Configuration and Cargo Features

GPU support is gated through Cargo features defined in frontend/src-tauri/Cargo.toml. The workspace uses conditional compilation to pull in the appropriate GPU runtime libraries:

[features]
default = []                     # CPU-only build

cuda = ["whisper_engine/cuda"]   # Enable NVIDIA CUDA

vulkan = ["whisper_engine/vulkan"] # Enable Vulkan (Linux/Windows)

When you compile with a specific feature, the build system links against the corresponding GPU runtime (CUDA Toolkit or Vulkan SDK) and configures the engine factory to attempt GPU initialization before falling back to CPU.

Building with CUDA Support (NVIDIA)

For NVIDIA GPUs on Windows or Linux, compile with the cuda feature:

RUST_LOG=debug cargo tauri build --features cuda

This command instructs the compiler to include the CudaEngine variant in whisper_engine::load_model. The build requires the NVIDIA CUDA Toolkit installed and nvcc accessible in your PATH.

Building with Vulkan Support (AMD/Intel)

For AMD or Intel GPUs on Linux, use the vulkan feature flag:

RUST_LOG=debug cargo tauri build --features vulkan

This enables the VulkanEngine backend. Ensure you have the Vulkan Loader and appropriate Mesa or AMD GPU drivers installed on your system.

Metal Support on macOS

Metal acceleration requires no manual feature flags. When building on macOS 13 or later, the whisper_engine automatically includes MetalEngine support via Core ML. Simply run:

cargo tauri build

The runtime detects macOS at compile-time using cfg!(target_os = "macos") and initializes the Metal backend when loading models.

CPU-Only Fallback

To force a CPU-only build—useful for CI environments or machines without GPU drivers—disable default features:

cargo tauri build --no-default-features

This excludes all GPU backends and statically links only the CpuEngine implementation.

Runtime Selection and Fallback Logic

The runtime selection logic in frontend/src-tauri/src/whisper_engine/whisper_engine.rs handles backend initialization automatically. When you invoke load_whisper_model from the frontend, the engine executes the following sequence:

  1. Platform Detection: Checks cfg!(target_os = "macos"), cfg!(target_os = "linux"), or cfg!(target_os = "windows") at compile-time.
  2. Feature Flag Check: Verifies which Cargo features (cuda, vulkan) were enabled during compilation.
  3. GPU Initialization: Attempts to instantiate CudaEngine, VulkanEngine, or MetalEngine based on platform and available drivers.
  4. Graceful Degradation: If GPU initialization fails (missing drivers, incompatible hardware), it automatically falls back to CpuEngine.

This design means you only need to specify the feature flag at build time; the application handles runtime detection and fallback without additional configuration.

Verifying GPU Acceleration at Runtime

To confirm which backend is active, run the application with debug logging enabled:

RUST_LOG=whisper_engine=debug cargo tauri dev

Look for initialization messages in the console output:


[DEBUG] whisper_engine::acceleration] Using CUDA backend (GPU: NVIDIA RTX 3080)
[DEBUG] whisper_engine::acceleration] Using Metal backend (GPU: Apple M3)
[DEBUG] whisper_engine::acceleration] Falling back to CPU – no GPU detected

The frontend TypeScript API remains backend-agnostic. Regardless of the compilation target, you load models using the same command:

await invoke('load_whisper_model', { modelName: 'base' });

Summary

Frequently Asked Questions

Does Meetily support AMD GPUs on Windows?

Currently, the Vulkan backend is primarily tested and supported on Linux. Windows builds focus on CUDA for NVIDIA hardware. AMD support on Windows may require additional configuration of the Vulkan SDK and is not officially guaranteed in the current whisper_engine implementation.

What happens if I build with CUDA but run on a machine without an NVIDIA GPU?

The application gracefully falls back to CPU inference. The whisper_engine::load_model function attempts to initialize CudaEngine first; if the CUDA runtime is unavailable or no compatible GPU is detected, it automatically instantiates CpuEngine without crashing or requiring user intervention.

Can I switch between GPU and CPU mode at runtime without rebuilding?

No. GPU backends are compiled into the binary at build time via Cargo features. To change acceleration methods, you must recompile with the appropriate flags (e.g., switching from --features cuda to --no-default-features). Runtime selection only chooses among the backends that were included during compilation.

Which GPU backend offers the best performance for transcription?

Performance depends on your specific hardware. Metal on Apple Silicon (M1/M2/M3) typically provides excellent efficiency through Core ML optimization. NVIDIA CUDA generally offers the highest throughput on desktop GPUs. Vulkan performance varies by driver quality on AMD/Intel Linux systems. Benchmark your specific model size (tiny, base, small) against your hardware to determine the optimal backend.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →