
Rabbit Hole
A collection of optimization and compatibility experiments. All scripts are available at https://codeberg.org/AnOrdinaryPeople/rabbit-hole
Discord Bot
A minimal FFmpeg build for Discord bots with Opus and PCM audio codec support. Patches Discord.js dependencies to work with Bun's bun compile by rewriting dynamic N-API imports in prism-media and WebSocket modules as static imports.
FFmpeg
Built from source starting with --disable-everything, then selectively re-enabling only what a Discord audio bot requires.
Upstream Patches
bun compile bundles everything into a single binary at build time, so dynamically called require() breaks.
prism-media
- FFmpeg detection: The original probes the system for FFmpeg by trying various paths at runtime. The patch hardcodes it, since the bot ships its own FFmpeg, discovery is unnecessary.
- Opus loader: The original uses a generic loader that walks through multiple Opus implementations at runtime. The patch replaces it entirely with a direct hardcoded
require()pointing to a specific prebuilt.nodebinary.
@discord/voice and @discord/ws
Both packages import the ws npm package. Since Bun exposes WebSocket natively via globalThis.WebSocket, the patch removes the import and replaces all references with globalThis.WebSocket.
PyTorch from Source
At the time of this build, CUDA 13 had no official PyTorch prebuilt wheels. Blackwell (sm_120) was only partially supported in nightly builds, with stable releases capped at sm_90. CUDA 13.0 shipped on 2025-08-04 with full Turing-Blackwell coverage. The workaround was a full source build.
SageAttention3
Compiled from source, as no pip install distribution is officially provided. Bazzite DX is an immutable Linux distro whose system Python is a stripped-down build without CPython internals, compiling any Python extension that links against libpython or libffi (such as SageAttention's CUDA kernels) fails on the host. Distrobox spins up a mutable container that shares the home directory, making builds accessible both inside and outside the container without requiring system privileges.
FFmpeg hwaccel
Built from source with NVIDIA hardware acceleration (NVENC/NVDEC/CUDA) and common codec support, targeting a custom CUDA 13 installation. patch.sh resolves a CUDA 13 header incompatibility with C++ before building.
CUDA 13 C++ Compatibility Fix
The issue is in math_functions.h. CUDA 13 declares functions like rsqrt and rsqrtf as extern without noexcept, but C++17 requires consistent declarations, if a function is defined with noexcept somewhere and declared without it elsewhere, the compiler errors out. FFmpeg's CUDA compilation targets C++17 via --nvccflags="-std=c++17", which triggers this conflict.
nv-codec-headers
NVIDIA's codec APIs (NVENC, NVDEC, CUVID) are not included in the CUDA toolkit. They're a separate header-only package maintained by the FFmpeg project, defining the interfaces FFmpeg calls at runtime against libnvidia-encode.so and libcuvid.so from the driver.
Static Build
Produces a self-contained ffmpeg binary with no .so runtime dependencies. Unlike the Discord Bot build which used --enable-shared to stay as lightweight as possible, this one is a portable general-purpose tool.
PipeWire Virtualization
Bazzite's ujust setup-virtual-surround automates otherwise manual PipeWire filter-chain configuration. It creates a virtual surround sink that folds multichannel audio (5.1, 7.1) down to stereo using HRTFs.
Forgejo Runner
A minimal self-hosted runner for Codeberg, hosted on Fly.io. The machine auto-stops when no jobs are queued and auto-starts via a Forgejo Webhook on git push, a workaround since no job-queued hook exists yet, though a PR is open to add job-level hook support.
Proton
Per-game compatibility notes on what each title required to run under Proton. Example game:
God of War Ragnarok
The game includes the PlayStation PC SDK, which is incompatible with Linux and causes error popups among other issues. NoPSSDK addresses the known SDK-related problems. Per a Sony announcement, PSN will become optional on PC, making the NoPSSDK bypass a reasonable approach.