Skip to content
civilnetwork-devPublic

About

A fork of Stellite's Gex ecosystem optimized specifically for Civil's needs.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Whiskey

Whiskey runs Windows programs in a web browser. It is a monorepo of three forks, each in its own directory, each built on its own:

Directory Whiskey's fork of Upstream commit Licence
gex/ BrowserPorts/stellite-gex, branch stellite (itself a fork of HeyPuter/gex) cc9093f10359 (2026-11-20) AGPL-3.0-only
wine/ BrowserPorts/wine-stellite, branch stellite (a fork of MercuryWorkshop/wine-wasm; Wine 11.15) d7333e9ed6db (2026-11-20) LGPL-2.1-or-later
mesa/ BrowserPorts/mesa-stellite, branch stellite (a fork of MercuryWorkshop/mesa-wink) cb8a55dab706 (2026-11-20) MIT, and each file's own

Each directory holds that repository's tree as it was at that commit, with Whiskey's changes on top. Each component's README opens with what Whiskey changed in it.

How the pieces fit

  • gex translates a program's machine code (x86-64, i386, AArch64) to WebAssembly and runs it against its own Linux kernel ABI, written in Rust and compiled to WebAssembly. It is also the page: the compositor (WebGPU), input, audio, and the drive, a block store in the origin private file system (OPFS).
  • Wine gives Windows programs their API. Its Unix side is compiled to WebAssembly; its PE side is x86-64 and i386 code that gex translates.
  • Mesa gives guests OpenGL and OpenGL ES through gex_wgpu, a Gallium driver that draws with the browser's WebGPU. Direct3D 11 runs on WebGPU through dirk (mesa/subprojects/dxvk), linked into Wine's PE core.

gex's build uses this tree's wine/ and mesa/: make wine builds ../wine (gex/Makefile WINE_DIR), and gex/third_party/mesa is a symbolic link to ../../mesa. Nothing is fetched for either.

What Whiskey changes

  • gex: the page's input (the numpad, the ISO key, PrintScreen, Pause, the Menu key, F13-F24 and the media and browser keys reach the guest; NumLock reaches the xkb mask), raw pointer lock (unadjustedMovement) for games, the Keyboard Lock and Screen Wake Lock APIs in full screen, persistent storage for the drive (navigator.storage.persist()), SHA-256 in Zig beside Rust's, the build wired to this monorepo and to Zig 0.18, and an apps test group. See gex/README.md.
  • Wine: winewayland.drv maps a PC keyboard's Menu key to VK_APPS, and the search and calculator keys, and win32u no longer gives the prefix a garbage menu bar height (every program's menu bar was a blank band). See wine/README.md.
  • Mesa: gex_wgpu reads each debug variable once instead of walking the environment on every draw, blit and upload, its gex-wasm target finds gex beside it in this monorepo, and its README maps the parts of the driver that apps, not only games, depend on. See mesa/README.md.

Architectures

Windows programs for x86-64 run as 64-bit Wine processes, and i386 ones through WoW64, as on 64-bit Windows 7, 10 and 11. gex also runs AArch64 programs, but as Linux programs: this Wine builds its PE side for x86-64 and i386 only, so Windows on ARM's ARM64 programs do not run yet. The browser's own CPU does not matter; it runs WebAssembly.

Building

On Linux or macOS, with what gex/README.md lists (Rust stable and nightly, LLVM 22, Emscripten, Node.js 24, MinGW-w64, and Zig):

$ cd gex
$ make wine      # this tree's Wine, 64-bit with WoW64, and a prefix
$ make page      # the page, Mesa included, in page/dist
$ make serve     # http://localhost:8088/

On Debian 13 (trixie), also under WSL 2 on Windows, this is what the build of 2026-11-23 installed:

  • from Debian: build-essential bison flex gawk libtool autoconf automake pkg-config cmake ninja-build python3 python3-venv wabt x11-xkb-utils qemu-user libexpat1-dev libfreetype-dev gcc-mingw-w64-x86-64 gcc-mingw-w64-i686 git make rsync curl xz-utils bzip2 unzip zstd file patch jq
  • from apt.llvm.org's llvm-toolchain-trixie-22: clang-22 lld-22 llvm-22 llvm-22-dev (22.1.8)
  • rustup with the nightly toolchain and its rust-src (rustup fetches the stable one rust-toolchain.toml pins when cargo first runs), Node.js 24.22.3, Zig 0.18.0-dev.1272, wasm-tools, Emscripten 6.0.1 through emsdk, and meson 1.5.2, mako, PyYAML and packaging in a Python venv

A first build takes hours; on a Ryzen 7 4800HS under WSL 2 (JOBS=12), gexc alone took 15 minutes and the page 12. The finished build used about 49 GB of disk: gex's caches 24 GB (Wine's build trees 18 GB of it), the checkout 11 GB (Cargo's target 8.6 GB of it), Debian's own /usr 8.5 GB, Rust 3.1 GB and Emscripten 1.6 GB. WSL 2 does not give freed space back to Windows by itself, and its disk image reached 72 GB here; compact vdisk in diskpart, on the distro's ext4.vhdx with WSL shut down, returns it.

Testing

cd gex && make check runs the Rust and Zig unit tests, and make test the runtime tests (node test/run.mjs). node test/run.mjs --host node --arch x86 apps runs the apps group (gex/test/apps): VS Code, Obsidian, Discord, Spotify, Steam, the Epic Games Launcher, Roblox, Notepad++, 7-Zip and PuTTY, each fetched from its vendor, installed silently and started, with GEX_TEST_WINE64_DIST and GEX_TEST_WINE64_PREFIX set as make wine prints them. It needs the network. Apps that need an account stop at their sign-in screen: the test does not sign in.

Results on 2026-11-23, on Debian 13 under WSL 2 (no GPU passthrough, so the host's GL is Mesa's llvmpipe), with Chromium 156 for the browser leg:

What Result
make check 810 passed, none failed
wine64/core, Wine on gexc passed
core group, in Node and in Chromium 12 passed; 122 skipped, as they need gexcc, which was not built
wine group: Wine in headless Chromium 21 passed (among them cases 23 checks, wow64 23 with 32-bit programs, crash 18, backtoback 14, xcache 14); 4 skipped: media (no FFmpeg on the host), site (needs an ejected Wine site), starter (needs gexcc), mem64spawn (needs a twin install, WINE64_TWIN=1)
Notepad++ 8.9.9.1, 7-Zip 26.06, PuTTY still running after 120 s, UI drawn; their menu bars came out as blank bands, from a garbage MenuHeight in the prefix, now fixed in win32u (wine/README.md)
VS Code known failure: the 16 GiB limit below
Discord fails to install: its Squirrel installer finds no .NET Framework 4.5 and runs Microsoft's, whose update package (KB2934520) Wine's wusa cannot install
Epic Games Launcher fails: exits with status 139 after its Slate UI starts; wineserver also gets ENOSYS from a file call
Fortnite skipped: it needs an Epic sign-in, and its Easy Anti-Cheat is off for Wine
Spotify installs (5 minutes), then the known 16 GiB failure
Roblox known failure: its installer exits, but no RobloxPlayerBeta.exe is installed
Obsidian fails: its installer had not exited after 30 minutes, twice
Steam installs (about a minute); its bootstrapper's own updater window runs and draws ("Installing update...") through the 10 minutes the test waits, so the check passes, but Steam's client UI (Chromium, steamwebhelper) was not reached

Chromium-based apps cannot start yet. Electron and CEF apps (VS Code, Discord, Obsidian, Spotify, Steam's UI) embed Chromium, whose allocator, PartitionAlloc, reserves two 16 GiB pools of address space as the process starts and stops the process when it cannot. A guest's memory is at most 16 GiB, the largest wasm memory64 V8 allows (Node 24.22.3 and Chromium 156 both refuse 17 GiB). Wine says so in its log ("needs more than 16 GiB of address space"), and the apps test reports such a run as a known failure with that cause. Chromium shrinks its pools only on iOS today, so this lifts when browsers allow larger wasm memories or an app ships a Chromium built with smaller pools.

Under WSL 2, leave the app runs memory headroom: on a 24 GB machine with other work open, Windows grew its page file to 38 GB during them, and only a restart shrinks it again. A memory= limit in %USERPROFILE%\.wslconfig bounds the Linux side.

Two games cannot pass here, by their makers' choice: Fortnite's Easy Anti-Cheat is not enabled for Wine or Proton, and Roblox's Hyperion refuses Wine. Whiskey does not hide the emulator from anti-cheat software.

Credits

  • gex, by Puter Technologies Inc. and its contributors.
  • Mercury Workshop's wine-wasm and mesa-wink: Wine's wasm32 host and the gex_wgpu WebGPU driver.
  • BrowserPorts' Stellite forks, stellite-gex, wine-stellite and mesa-stellite: 64-bit Wine with WoW64, LPC ports, winlogon, window stations, Windows 7 glass, the block store, and the driver fixes their READMEs list.
  • Wine and Mesa, and every author their AUTHORS files and histories name.

Licences

Each directory keeps its upstream's licence: gex/LICENSE (AGPL-3.0-only; gex/NOTICE lists its third-party code), wine/LICENSE (LGPL-2.1-or-later), and mesa/docs/license.rst. NOTICE says what Whiskey changed, and when.

About

A fork of Stellite's Gex ecosystem optimized specifically for Civil's needs.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages