Configuration

Generic

Env varExplanation
MACH_DEBUG_AUDIO=trueenable verbose audio debug logging

Linux

On Linux, Mach binaries have both Wayland/X11, and Vulkan/OpenGL/GLES support built-in (loaded dynamically via dlopen.)

Mach will try to use Wayland and Vulkan first. If Wayland is unavailable, it falls back to X11 automatically. If Vulkan is unavailable, it falls back to OpenGL.

Env varExplanation
MACH_FORCE_BACKEND=x11force the use of X11 backend only
MACH_FORCE_BACKEND=waylandforce the use of Wayland backend only
MACH_FORCE_GPU_BACKEND=openglforce the use of OpenGL backend only
MACH_FORCE_GPU_BACKEND=vulkan.force the use of Vulkan backend only
MACH_FORCE_GPU_BACKEND=openglesforce the use of OpenGLES backend only

Windows

On Windows, Mach only officially supports shipping applications with Direct3D.

Sometimes it’s helpful for developers on Windows to test the OpenGL, Vulkan, or OpenGL ES backends on a Windows host. We don’t support shipping games in this configuration, but they can be enabled via build.zig (OpenGL ES support varies across drivers, Vulkan depends on the heavyweight LunarG Vulkan SDK. OpenGL is generally always available.)

macOS

On macOS, Mach only supports Metal.

Table of contents