Skip to content
buntatoes edited this page Nov 29, 2026 · 4 revisions

Vodka Logo

Vodka Wiki

Vodka is a 100% standalone Windows compatibility runtime built from scratch in Zig (0.17.1+) and architecture-specific inline assembly (x86_64, i386, aarch64) under the Apache License 2.0 for Linux and Pisco.

Every subsystem — freestanding ELF & Darwin Mach-O preloaders, 32/64-bit runtime loaders (vodka-loader / vodka64), prefix Setup INF engine (vodka.inf), 43-opcode NT kernel daemon (vodkaserver), zero-dependency Wayland display driver (libvodkawayland.so), PipeWire/ALSA WASAPI audio engine (libvodka_audio.so), dynamic Vulkan 1.4 WSI & D3D11-over-Vulkan GPU bridge, recursive PE64 & hardware CS=0x23 PE32/WoW64 loader with x86_64 SEH/VEH and Linux futex Win32 synchronization (libvodka_ntdll.so), 731 multi-architecture Windows PE modules across x86_64, i386, and aarch64 (2,193 PE binaries), 116 native PE64 Windows programs, 7 standalone binary .nls tables, and a 21-tool pure-Zig developer toolchain — is original Vodka code with zero legacy C/LGPL files or external runtime dependencies.

The standalone Vodka repository spans 1,041 Zig files (318,463 LOC) producing 2,389 built artifacts per multi-architecture build (zig build -Doptimize=ReleaseSafe -Dglibc-compat=true).

Caution

Anti-Cheat & Online Multiplayer Games — Use at Your Own Risk: Vodka is an experimental, standalone Windows compatibility runtime built from scratch and under active development. While Vodka is designed strictly as a non-invasive compatibility layer (with zero memory tampering, code injection, or anti-cheat bypassing), running online multiplayer games protected by anti-cheat systems (such as VAC, Easy Anti-Cheat, BattlEye, Warframe's anti-cheat, or other kernel/user-mode anti-cheat software) through Vodka or Pisco is strictly at your own risk. Game publishers and anti-cheat operators control their own detection policies and may flag, kick, or permanently ban accounts using unofficial or custom compatibility runtimes. Do not test experimental builds on primary accounts you cannot afford to lose.


Architecture Highlights

  • Freestanding ELF & Mach-O Preloaders (vodka-preloader / vodka64-preloader): Zero-libc static binaries (link_libc = false, zero ELF relocations) across x86_64, i386, and aarch64 Linux (plus cross-compiled Darwin Mach-O x86_64-macos / aarch64-macos preloader) using naked _start assembly and raw syscalls to reserve Win32 virtual address space ranges before the dynamic linker initializes.
  • Native Runtime Loaders & Prefix Setup (vodka-loader, vodka64, vodka.inf, vodkaboot, vodkapath): Dual-architecture ELF loaders with inline-assembly cpuid/mrs 64-bit CPU probing, VODKAPRELOADRESERVE= handling, vodka_r_debug/vodka_main_preload_info symbols, direct ntdll.so / libvodka_ntdll.so discovery, from-scratch prefix Setup INF + .reg compiler (inf_engine.zig), XDG desktop entry (vodka.desktop), and Apple bundle metadata (vodka_info.plist.in).
  • Native NT Kernel Daemon (vodkaserver): epoll-driven AF_UNIX daemon with /dev/ntsync probing, 64-byte binary RPC framing (GenericRequest/GenericReply), and 43 RPC opcodes (0–42) serving live NT kernel subsystems (objects, handles, synchronization, .reg-backed Registry, processes/threads, global atoms, named pipes, IOCP, section mappings, job objects, security tokens/ACLs, window stations/desktops/clipboard, byte-range file locks, and mailslots).
  • Recursive PE64, Hardware CS=0x23 PE32/WoW64 & SEH/VEH Runtime (libvodka_ntdll.so):
    • Maps PE64 images, applies base relocations, resolves recursive PE Export Directory forwarders (dll.symbol), allocates PE64 IMAGE_TLS_DIRECTORY64 (GS:[0x58] / TEB64.ThreadLocalStoragePointer) slots, initializes TEB64/PEB64, and dispatches Microsoft x64 ABI (win64) <-> System V AMD64 ABI thunks via inline assembly.
    • x86_64 SEH / VEH (seh.zig): Registers PE64 .pdata/.xdata unwind tables (RtlLookupFunctionEntry, RtlVirtualUnwind) and installs Linux sigaction(SA_SIGINFO) handlers translating SIGSEGV/SIGBUS/SIGFPE/SIGILL/SIGTRAP into Windows EXCEPTION_POINTERS with full EXCEPTION_CONTINUE_EXECUTION register restoration.
    • Hardware CS=0x23 PE32 / WoW64 (wow64.zig): Maps i386 PE32 images below 4 GiB (MAP_32BIT), applies HIGHLOW relocations, enters hardware 32-bit compatibility mode (CS=0x23), and bridges 32-bit stdcall API imports across a dynamic CS=0x23 <-> CS=0x33 call gate.
    • Linux Futex Win32 Sync & OS-Backed BCrypt/WinHTTP (win32_deep_thunks.zig): Real futex-backed SRWLOCK, CONDITION_VARIABLE, InitOnce, WaitOnAddress, recursive CRITICAL_SECTION, and Win32 Mutex primitives; 1088-slot TLS/FLS; bcrypt.dll backed by Linux getrandom + SHA-256/512/SHA-1/MD5; and winhttp.dll backed by POSIX TCP + dynamic libssl.so TLS.
  • 731 Multi-Architecture Windows PE Modules (vodka/build/dll_manifest.zig): Cross-compiled directly from Zig to x86_64-windows, i386-windows, and aarch64-windows (2,193 PE binaries per build, selectable via -Ddll-set=core|gaming|full):
    • 41 core & gaming DLLs (ntdll, kernel32, kernelbase, advapi32, user32, gdi32, vulkan-1, dxgi, d3d11, d3d12, ws2_32, bcrypt, winhttp, mmdevapi, xaudio2_9, xinput*, etc.)
    • 99 forwarder, API-set, binary MSFT TypeLib, visual theme (light.msstyles), and COM proxy modules
    • 25 WoW64 (wow64*), NT Kernel Executive (ntoskrnl.exe), HAL (hal.dll), and 20 .sys kernel drivers
    • 31 legacy & versioned CRT, MSVC C++ STL, Managed CRT, ConcRT, and OpenMP modules
    • 66 Graphics, DirectX 8–12, D3DX, Direct2D/DirectWrite, OpenGL, and WIC/GDI+ imaging modules
    • 113 Windowing, UI Controls, Printing, Audio, XAudio2, DirectInput, and Media Foundation/DirectShow modules
    • 108 COM/OLE, Shell, Networking, Cryptography, Security, and WMI modules
    • 107 WinRT (50), XML/Web/Scripting (25), and Extended Gaming/Display/Font (32) modules
    • 141 Enterprise/ODBC/LDAP (45), System Services/SNMP/Power (43), and 16-Bit/VDM/VxD Compatibility (53) modules
  • Zero-Dependency Wayland, Dynamic Vulkan 1.4 WSI & D3D11-over-Vulkan: libvodkawayland.so speaks the Linux Wayland binary wire protocol directly over AF_UNIX (xdg-shell, wp_fractional_scale_v1, wp_viewporter, memfd SHM swapchain pool, clipboard/DnD, pointer constraints, XKB, cursors, multi-monitor DisplayConfig), paired with a dynamic Vulkan 1.4 Win64 <-> SysV ICD + Wayland WSI swapchain bridge and a live D3D11-over-Vulkan / DXGI adapter bridge.
  • Native PipeWire + ALSA Audio (libvodka_audio.so & vodka-audio): Lock-free SPSC PCM ring buffer, sample format conversion (i16/i24/i32/f32), WASAPI endpoint/session/client engine, and XAudio2/DirectSound/WinMM thunks.
  • 21-Tool Pure-Zig Toolchain, 7 .nls Tables & 116 Native PE64 Programs: Complete pure-Zig compiler, resource, IDL, Unicode/NLS (generating 7 binary .nls tables into share/vodka/nls/), WinAPI ABI, unwind debugger, and CI toolchain (vodka-mc, vodka-rc, vodka-dump, vodka-build, vodka-gcc, vodka-makedep, vodka-idl, vodka-maker, vodka-triple, vodka-specgen, vodka-dev, vodka-unicode, vodka-winapi, vodka-dbg, vodka-ci, vodka-sfnt2fon, vodka-xftmpl, vodka-proto, vodka-install, vodkapath, vodkaboot), plus 116 native PE64 Windows programs and 24 live verification executables (23 PE64 + 1 PE32 WoW64).

Quick Start

Requires Linux and Zig 0.17.1+:

# Build all host + multi-arch (x86_64, i386, aarch64) binaries, DLLs, tools, programs, and NLS tables
zig build -Doptimize=ReleaseSafe -Dglibc-compat=true

# Run the complete unit test suite
zig build test

# Initialize a Vodka prefix and run a Windows executable
VODKAPREFIX=~/.vodka ./zig-out/bin/vodka vodkaboot
VODKAPREFIX=~/.vodka ./zig-out/bin/vodka hostname.exe

# Run PE64 and 32-bit WoW64 verification binaries directly via vodka-pe
./zig-out/bin/vodka-pe --run ./zig-out/lib/vodka/x86_64-windows/vodka_smoke.exe
./zig-out/bin/vodka-pe --run ./zig-out/lib/vodka/i386-windows/vodka_wow64_smoke.exe

# Probe the host Wayland compositor and audio stack
./zig-out/bin/vodka-wayland
./zig-out/bin/vodka-audio --probe

Hardware Support Note

Hardware Testing Disclaimer: Vodka is currently developed and tested exclusively on an AMD Ryzen CPU and AMD Radeon RX 7900 XT (RADV NAVI31) on Linux. NVIDIA and Intel GPU/CPU support is currently untested / unknown. See Hardware and Compatibility for details and how to submit test reports.


Reporting Game Issues

If you encounter an issue with a specific game when running through Vodka or Pisco, please open a GitHub issue on buntatoes/vodka (or buntatoes/pisco for Steam Play / Pisco issues) and include:

  • Game title — full game name, Steam AppID (or launcher), and any launch options used.
  • Steps to replicate — clear steps to reproduce the issue, along with expected vs. actual behavior.
  • Hardware & OS details — CPU, GPU and driver/Mesa version (e.g. Mesa RADV, NVIDIA driver, Intel ANV), Linux distro, kernel version (including /dev/ntsync status), and display server (Wayland + compositor vs. X11).
  • Pisco version — the exact Pisco version used, along with the Vodka (and Bitters/Tonic) version or branch/commit if built from source.
  • Logs (optional, helpful) — relevant PROTON_LOG=1 / PISCO_LOG=1 output and BITTERS_LOG_LEVEL=info for graphics issues (scrubbed of any personal paths or credentials).

Pisco Integration

Vodka serves as the standalone Apache-2.0 runtime core for Pisco alongside its Apache-2.0 Zig companion projects:

  • Pisco — Steam Play compatibility tool and zero-Python native Zig launcher/tooling.
  • Bitters — From-scratch Direct3D 8/9/10/11 & DXGI to Vulkan 1.4 graphics translation layer in Zig (early alpha).
  • Tonic — From-scratch SAPI 5 (sapi.dll) speech synthesis (Klatt formant TTS, optional host libspeechd bridge) & finite-grammar MFCC/DTW voice-command engine in Zig (early alpha).

vodka, vodka-loader, vodka64, vodka-preloader, and vodka64-preloader preserve strict loader ABI continuity — including dual-arch i386-unix/vodka64[-preloader] -> x86_64-unix path resolution, vodka_r_debug/vodka_main_preload_info ELF symbol patching, and glibc 2.31 (-Dglibc-compat=true) SteamRT compatibility.


Documentation Index

Page Description
Architecture End-to-end runtime data flow, process bootstrap, SEH/VEH, hardware CS=0x23 WoW64, futex sync, and subsystem map
Build and Test Prerequisites, zig build options, zig-out/ artifact layout (2,389 artifacts), and live verification
Vodka Server and RPC vodkaserver daemon lifecycle, 64-byte binary RPC framing, vodka-proto, and all 43 NT kernel RPC opcodes
PE Loader and Win32 DLLs libvodka_ntdll.so, SEH/VEH, hardware CS=0x23 WoW64, futex sync, BCrypt/WinHTTP, and all 731 PE modules
Vulkan, DXGI, and Wayland Dynamic Vulkan 1.4 WSI bridge, 2D/3D/compute SPIR-V validation, D3D11-over-Vulkan bridge, and libvodkawayland.so
Audio Engine libvodka_audio.so, vodka-audio, SPSC PCM ring buffer, WASAPI, PipeWire, and ALSA
Pure-Zig Toolchain Complete 21-tool developer, compiler, Unicode/NLS (7 .nls tables), ABI, debugger, and CI toolchain reference
Native Windows Programs Categorized reference for all 116 native PE64 Windows programs and 24 live verification binaries
Hardware and Compatibility Tested hardware matrix, Anti-Cheat & Multiplayer guidance, glibc/SteamRT, compositor/Vulkan, and Pisco
Licensing and Roadmap Standalone Apache-2.0 code license, Vodka trademark policy, completed development milestones, and forward roadmap

Clone this wiki locally