REDBRIDGE / DOCS

REDbridge on Linux

Status: being explored on the proton branch (2026-11-29). The owner wants it (2026-11-06). A spike that day found that most of a native Linux build runs with no code changes, and textures are the blocker. The first route now tried is the Windows build under Proton or Wine (below); the native build (L1 to L3) is the fallback.

Proton: the Windows build under Wine

Decided 2026-11-29: try this first. One Windows build for every client, run under Wine on Linux:

The self-contained build

REDbridge-<version>-win-x64-selfcontained.zip: dotnet publish -r win-x64 --self-contained true, with .NET inside, so no .NET 10 has to be installed in a prefix. Built beside the usual zip in build.yml and release.yml (job selfcontained). Since 2026-11-29 (the owner’s go) a release carries both zips: release.yml’s release job waits for both builds and attaches both. Its name must not end in win-x64.zip: REDcode (bridgeUpdater.ts), EDGEdeck and REDnode on Windows (bridge-install.js) take the first release asset matching /win-x64\.zip$/; REDnode under Proton takes /win-x64-selfcontained\.zip$/ (REDnode’s proton branch).

What it holds beyond the usual zip (0.21.0, built on Linux): 270 files and 168 MB unpacked against 104 files and 122 MB. The extra 189 files (about 101 MB) are the .NET 10 runtime: its engine (coreclr.dll, clrjit.dll, hostfxr.dll, hostpolicy.dll, System.Private.CoreLib.dll and the rest), 165 System.* and 6 Microsoft.* libraries, and msquic.dll. The usual zip’s SQLite builds for 21 other platforms (runtimes/) are left out; the Windows x64 SQLite and ClearScript V8 sit at the root.

Which prefix

The game’s own Proton prefix, steamapps/compatdata/1091500/pfx, run with Proton’s wine and WINEPREFIX set to it. Then REDbridge started from VS Code and the one REDnode starts in the game share one %LOCALAPPDATA%\REDnode\bridge install, one key store (%APPDATA%\Edgemodders\keys) and one sector cache (%LOCALAPPDATA%\REDbridge\cache).

Paths

Every prefix maps Z: to /, so Z:\home\you\proj is /home/you/proj. A client on Linux would translate disk paths only (depot paths such as base\... stay as they are):

Direction Change
To REDbridge Put Z: before the Linux path. .NET under Wine should take forward slashes (Z:/home/you/proj); with REDbridge’s working folder on Z:, a plain /home/you/proj may resolve there too. Both unverified
From REDbridge Drop Z: and turn \ into /

Extra drive letters (a symlink in <prefix>/dosdevices/, such as g: to the game folder) are a fallback only if long Z:\ paths or Windows-layout checks cause trouble.

What the clients would need (REDcode, as read on 2026-11-29)

Where Now Under Wine
bridgeClient.ts spawn Starts REDbridge.exe Start it through Proton’s wine with WINEPREFIX; translate paths
bridgeUpdater.ts unzip PowerShell Expand-Archive An unzip that works on Linux
bridgeUpdater.ts running bridges Get-CimInstance; already skipped off Windows Unchanged
bridgeUpdater.ts .NET check dotnet --list-runtimes Not needed with the self-contained build
library.ts game version PowerShell VersionInfo Another way, or the fallback
gameView.ts Windows only already Unchanged

EDGEdeck and REDnode’s install code have not been read for this yet.

Checks to run under Proton

  1. The self-contained REDbridge.exe starts in the game’s prefix and answers bridge.info.
  2. texture.* and image imports (DirectXTexNet under Wine).
  3. tools/linux-check.py or the probe through Wine against the Steam install, compared with Windows.
  4. Disk paths: Z:\..., Z:/... and plain /... in and out.
  5. project.pack’s archive loads in the game under Proton.
  6. sound.importWavs (opusenc.exe under Wine).
  7. keys.* with --keys (Wine’s DPAPI).
  8. REDnode’s Get REDbridge installs into the prefix.

First run under Wine (2026-11-29)

   
Build REDbridge 0.21.0 (the proton branch), dotnet publish -c Release -r win-x64 --self-contained true on Linux (.NET SDK 10.0.404), 168 MB, every file the Windows build check lists present
Wine 11.0, the Flatpak org.winehq.Wine stable-26.08, its own prefix, nothing installed in it
Check tools/wine-check.py, no game
Method Under Wine
Start, bridge.info Works: 6 s the first time (the prefix is made), 1.2 s after
hash.fnv1a64 Works, the same hash as Python’s FNV-1a 64
texture.imageToPng (TGA and PNG in) Works. It goes through WolvenKit’s RedImage and DirectXTexNet, the type that failed on native Linux
Paths Z:\..., Z:/... and a plain /mnt/... all work in; answers come back as Z:\...
project.import of a PNG with color, normal, grayscale Works: .xbm files with TCM_QualityColor, TCM_Normalmap, TCM_QualityR and mipmaps
texture.fileToPng of those .xbm files, cr2w.fileToJson Work
project.pack of the .xbm files, archive.openMod of the archive Work: 3 files listed back with their names
keys.set, keys.get with --keys (scratch store) Work. The file holds Wine’s DPAPI blob (Wine Crypt3 in its header), so a key stored under Wine reads only under Wine, not on Windows

The log says “Oodle couldn’t be loaded. Using Kraken.dll instead” at each pack: with no game folder there is no game Oodle. Whether a game folder under Wine gives Oodle is unverified.

The probe against the game, under Wine and under Proton (2026-11-29)

The game (Steam build 26161058, game 2.5) installed through the Steam Flatpak. tools/probe.py ran in full, exit 0, with the same build as above:

  Wine 11.0 Flatpak, its own prefix Proton Experimental 11.0 (20261123b), the game’s prefix
Result Passed, 68.4 s Passed, 109.1 s
Game loaded 57 archives, 592,071 files in 5.4 s, the game’s Oodle (no Kraken) The same
TweakDB 14.8 s 14.4 s
Exports Real folders: no file name with a backslash in 46 files (the native build’s L1 fault does not happen) The same

The last Windows probe took 52.5 s. Everything in the probe passed: archives, CR2W round trips, documents, texture.toPng, texture imports with every preset, mesh info, sector find, nodes and build (V’s door with its proxy, 39 s the first time, then cached in the prefix’s %LOCALAPPDATA%\REDbridge\cache), TweakDB, on-screen texts and spoken lines, mesh, entity and animation exports, .anims imports, anims.sync.

The probe needed two changes, both a client’s work on Linux, not the bridge’s: answers’ Z:\... paths turned back into Linux paths (from_wine), and project-relative answers such as source\resources\probe.archive.xl joined with / (local). REDcode and EDGEdeck need the same two.

Starting REDbridge with Proton

Proton Experimental 11’s wine needs glibc 2.38, and the dev PC’s Pop!_OS 22.04 has 2.35. Do not upgrade the system glibc. What was tried:

How Result
proton run REDbridge.exe on the host GLIBC_2.38 not found
Steam Linux Runtime 4’s _v2-entry-point --verb=run -- proton run REDbridge.exe, in the Steam Flatpak Starts, but no answer: proton run goes through Proton’s steam.exe (unverified that it drops stdio, but nothing came back), and the bridge hung
_v2-entry-point --verb=run -- <Proton>/files/bin/wine REDbridge.exe Starts and loads the game, then stdin is closed at once (“Client disconnected”): the runtime’s container, started from the Flatpak, passes no stdin
Proton’s wine in the Steam Flatpak, no runtime container Works. The Flatpak’s runtime has glibc 2.44
S=~/.var/app/com.valvesoftware.Steam/.local/share/Steam
flatpak run --env=WINEPREFIX="$S/steamapps/compatdata/1091500/pfx" --env=WINEDEBUG=-all \
  --cwd=<bridge dir> --command="$S/steamapps/common/Proton - Experimental/files/bin/wine" \
  com.valvesoftware.Steam <bridge dir>/REDbridge.exe [--game <Linux path>]

The Steam Flatpak sees /mnt and its own folders. A bridge or project elsewhere needs flatpak override --user --filesystem=<path> com.valvesoftware.Steam. With Steam installed natively rather than as a Flatpak, the same command without flatpak run should need a host glibc of 2.38 or later, or Steam Linux Runtime with stdin; unverified.

Not yet tried: sound.importWavs, a mesh export with materials and their images (the probe exports with meshMaterials: false), the game loading an archive or a texture made under Wine or Proton, REDnode’s Get REDbridge inside the prefix, and the bridge running while the game runs in the same prefix. Under Wine and Proton textures work, so L2 is not needed for this route.

On the Linux dev PC (2026-11-29), before the run above: no Wine, no .NET SDK (both since installed, see dev setup, section 7). Steam is the Flatpak (~/.var/app/com.valvesoftware.Steam); its library has Cyberpunk 2077 and Proton - Experimental folders and a compatdata/1091500 prefix, but all three were empty, so the game and Proton are not downloaded.

The spike

   
Date 2026-11-06
Build REDbridge 0.12.0, WolvenKit 10.0.0-beta.1, dotnet publish -c Release -r linux-x64 --self-contained true (148 MB), from a copy of the source
Where it ran WSL 2, Ubuntu 24.04, reading the Windows install of game 2.5 at /mnt/e/...
Check tools/linux-check.py, on Linux and on Windows, comparing the files each wrote
Code changed None

Not tested: a real Linux install, a game under Proton, and the game loading an archive packed on Linux.

What works and what does not

Area On Linux
archive.*, hash.*, sound.events, tweakdb.*, loc.*, mesh.items, mesh.info, sector.find, sector.nodes, sector.build Work
archive.extract Works. A mesh and a texture came out byte for byte the same as on Windows
cr2w.toJson, cr2w.fromJson, documents Work. The JSON differs from Windows only in its export time and line endings. A rebuilt mesh is 3% larger (306,637 bytes, 296,907 on Windows, where it matches the original exactly), since it is compressed with Kraken rather than the game’s Oodle; the Windows build reads it back to the same JSON
project.pack Works. A file’s id is the hash of its path with backslashes, as the game wants. The Windows build reads the archive back byte for byte
project.export of a mesh Works, with two faults. The .glb is the same size as on Windows. 41 of the 43 files land in one folder with backslashes in their names (base\surfaces\...json). The images are missing: 150 files on Windows, 43 on Linux, 105 of the difference images
project.import of a .glb Works
texture.toPng, texture.fileToPng, texture.imageToPng, project.import of an image Fail: The type initializer for 'DirectXTexNet.TexHelper' threw an exception, or RedImage calling a valid PNG invalid
sound.importWavs Not reached: the check’s sound id was made up. It starts opus-tools/opusenc.exe, so it should fail on real Linux. Under WSL an .exe still starts, so WSL cannot show this

The plan

Effort figures are rough estimates.

L1: a Linux build without textures (1 to 2 days)

L2: textures (1 to 3 weeks)

WolvenKit’s texture code calls DirectXTexNet, a C++/CLI library that runs only on Windows (lib/DirectXTexNetImpl.dll, lib/Ijwhost.dll, lib/texconv.dll). It is used directly in nine WolvenKit files, mainly RedImage.cs (1,055 lines), RedImage.Lut.cs and DDS/Texconv.cs, and in Modkit’s Uncook.cs, Import.cs and the mlmask tools.

Option Gives Cost
Change WolvenKit: a cross-platform texture library behind the same calls, sent upstream Everything, including images in mesh exports Needs upstream to accept it, or a fork. REDbridge now uses WolvenKit’s NuGet packages, so a fork means building them
Our own texture code in REDbridge, for texture.* and image imports PNG conversion both ways Mesh exports still lack images. Our .xbm output must satisfy the game

Recommended, unverified: try changing WolvenKit first. Candidates to look at: DirectXTex’s own Linux build through a small C shim, and a managed BC encoder such as BCnEncoder.NET. Check their licenses, formats (the game uses BC1 to BC7) and that their output matches, against the Windows build.

L3: the tools that start it (2 to 4 days)

REDcode (bridgeUpdater.ts, bridgeClient.ts), EDGEdeck (bridgeInstall.ts, bridgeClient.ts) and REDnode (bridge-install.js, redbridge.js) look for REDbridge.exe and the win-x64 zip by name. REDcode also lists running bridges through PowerShell. A search found Windows-specific code in EDGEmat, EDGEbuilder, EDGEwave and REDsave too; how much of it concerns REDbridge is unverified.

Each tool needs: pick the zip for the platform, the executable’s name, a .NET lookup (or a self-contained build), and Linux game folders (Steam’s steamapps/common).

Open questions