[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-115827":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":12,"openIssues":13,"contributorsCount":14,"subscribersCount":14,"size":14,"stars1d":15,"stars7d":16,"stars30d":16,"stars90d":14,"forks30d":14,"starsTrendScore":17,"compositeScore":18,"rankGlobal":9,"rankLanguage":9,"license":19,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":9,"pushedAt":24,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":14,"starSnapshotCount":14,"syncStatus":15,"lastSyncTime":28,"discoverSource":29},115827,"legion-kvm","brcly\u002Flegion-kvm","brcly","Legion is a lightweight KVM made for running games. Legion provides set specific hardware values to ensure compatibility.",null,"Rust",75,6,3,0,2,21,10,59.14,"GNU Affero General Public License v3.0",false,"main",true,[],"2026-11-20 11:05:12","2026-11-23 20:02:21","# Legion KVM\n\nLegion runs Windows applications through Proton inside a Linux KVM guest.\nGraphics use Mesa Venus over virtio-GPU, with a local desktop window, input,\naudio and shared directories. The guest kernel, Mesa, virglrenderer and QEMU\nare bundled. GPU vendor drivers stay on the host; Legion no longer forwards\nNVIDIA ioctls or maintains NVIDIA driver ABI tables.\n\n## Running\n\nRun the packaged executable as your desktop user with access to `\u002Fdev\u002Fkvm`\nand your GPU render node. A Wayland desktop and a host Vulkan driver with the\nexternal-memory and synchronization capabilities required by Venus are needed.\nAVX-512 is not required; the guest uses the reduced XSTATE CPU profile.\n\nSteam launch options:\n\n```text\n\u002Fpath\u002Fto\u002Flegion %command%\n```\n\nFor native Faugus, Lutris and Heroic packages, put only `\u002Fpath\u002Fto\u002Flegion` in\nthe launch-command prefix or wrapper field and keep the launcher's installed\nProton and prefix selections. Faugus uses **Launch Arguments**, Lutris uses\n**System options → Command prefix**, and Heroic uses **Advanced → Wrapper**.\nDo not append the game executable or `%command%` in those fields.\nSee [launcher integration](docs\u002Flauncher-integration.md) for supported runners,\nread-only diagnostics and Flatpak limitations.\n\nFor an environment toggle, configure `legion auto` as the wrapper, then set\n`LEGION=1` for games that should use the VM. Unset it or use `LEGION=0` to run\nthe original launcher command. Use launcher-wide wrapper defaults where available.\n\nAn explicit launch can select an installed Proton and Wine prefix:\n\n```sh\nlegion run --proton \u002Fpath\u002Fto\u002FProton --prefix \u002Fpath\u002Fto\u002Fprefix -- \u002Fpath\u002Fto\u002Fapplication.exe\n```\n\nThe selected prefix, application directory and home remain shared and writable.\nInstalled Proton files remain unchanged. Legion does not require a particular\nProton version, but that Proton must support Wine Wayland and the Vulkan features\nthe game needs. In particular, Vulkan layered-driver reporting through\n`VK_KHR_maintenance7` matters for some VKD3D feature checks. The private matched\nWine graphics backport used in UE5 testing is a research tool, not a universal\nreplacement for arbitrary Proton builds. See [research notes](docs\u002Fvenus-research.md).\n\n```sh\nlegion doctor\nlegion doctor --graphics\nlegion cpu-check\n```\n\n`doctor` checks host prerequisites. `doctor --graphics` boots a disposable VM,\nopens the host display window and verifies guest hardware Vulkan enumeration\nwithout touching a game or prefix. Enumeration alone does not prove rendering;\napplication and synthetic tests provide that evidence separately.\n\nConfiguration:\n\n- `LEGION_RENDER_NODE` selects a DRM render node, such as `\u002Fdev\u002Fdri\u002FrenderD128`.\n- `LEGION_MEMORY_MIB` sets guest RAM; the default is 12288 MiB.\n- `LEGION_FULLSCREEN=1` opens the host display fullscreen.\n- `LEGION_WINDOW_SYSTEM=auto|wayland|x11` selects the host window system. Auto\n  retries through XWayland only if initial Wayland window creation fails.\n- Games use the guest Wayland compositor. `LEGION_DISPLAY_BACKEND=wayland`\n  remains accepted; the retired NVIDIA XWayland forwarding path is unavailable.\n- `LEGION_STARTUP_UI=auto|window|log|off` controls startup feedback.\n- `LEGION_STARTUP_TIMEOUT_SECONDS` allows 30–900 seconds to the first frame\n  (default 180). Interactive sessions have no time limit after that frame.\n\nThe desktop window leaves system shortcuts, including Super\u002FWindows bindings,\nwith the host compositor. Guest cursor images use the virtual GPU's hardware\ncursor; moving the pointer does not copy the game's framebuffer through the CPU.\n\nLogs are saved under `XDG_STATE_HOME\u002Flegion`, normally `~\u002F.local\u002Fstate\u002Flegion`.\nKeep the printed session directory when reporting failures. It contains the\nbuild identifier, launch configuration, VM report, QEMU\u002Fconsole logs and guest\nstartup stages. Include `legion --version`, `doctor`, and `doctor --graphics`.\nRuntime extraction is cached under `XDG_CACHE_HOME\u002Flegion`.\n\nThe Venus cutover is tested on an RTX 4070 Ti SUPER with NVIDIA 620.70.06;\nthe earlier performance studies used 615.78.08. The Ryzen 9800X3D integrated\nRadeon 610M also passed D3D11 pixel checks and D3D12 pixel\u002Fpresentation checks\nthrough Venus using a private RADV 25.0.7 host driver. RADV 26.2.6 also passes\nguest enumeration and a synthetic GPU pixel check on that integrated GPU,\nincluding selection with both AMD and NVIDIA host drivers visible. Other\nGPU\u002Fdriver combinations and 32-bit games still require qualification.\n\nAn AMD kernel driver alone is insufficient: the host also needs an AMD Vulkan\ndriver (for example, `vulkan-radeon` on Arch-based systems). Normal sessions\nverify that the guest Vulkan vendor\u002Fdevice IDs match the selected render node\nbefore starting the application. Missing drivers or a conflicting\n`VK_DRIVER_FILES` setting must fail rather than silently use another GPU.\nHost Vulkan driver overrides and filters inherited from launchers are recorded\nin `vm\u002Freport.json` under `host_vulkan_environment`. Their manifests must be\nusable by Legion's 64-bit host renderer, outside any runner container.\nNVAPI\u002FNGX integration is disabled on this path pending separate validation.\n\n## Building\n\nInstall Python 3.11 or later and rootless Podman or an accessible Docker engine.\nThe build uses an isolated Debian toolchain; host Rust and development libraries\nare not required. Allow at least 25 GiB and internet access for a first build.\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002Fbrcly\u002Flegion-kvm.git\ncd legion-kvm\npython3 tools\u002Fbuild.py --jobs 4\n```\n\nThe result is **`build\u002Fdist\u002Flegion`**, a single executable containing the runtime.\nUsers supply their applications, Proton and host Vulkan driver. No module is\ninstalled into the host kernel. No installed Proton is needed to build Legion;\n`--proton \u002Fpath\u002Fto\u002FProton` optionally adds dependency discovery without pinning\nnormal launches to that version.\n\nSources\u002Fchecksums live in `config\u002Fsources.json`; the private host ABI package\nbaseline is recorded in `config\u002Fhost-packages.json`. The build compiles Venus,\nvirglrenderer with Venus enabled, QEMU, the guest kernel and production Rust\nbinaries, then checks host-tool startup on CPU profiles without AVX-512.\nDownloads and intermediate files stay in ignored `build\u002F`. Repeating the build\nresumes completed stages; `--output` selects another build directory.\n\n`--wine-repair --proton \u002Fmatching\u002FProton` can include the existing optional\nntdll repair, checked against `config\u002Fcompatibility.json`. It remains disabled\nunless `LEGION_WINE_REPAIR=1` is set. Normal Venus launches use stock Proton and\nhave no ntdll hash requirement.\n\n## Development\n\nThe production path is launcher → QEMU\u002Fvirtio-GPU → virglrenderer\u002FVulkan, with\nMesa Venus in the guest. CPU compatibility, directory sharing, Proton startup,\nKMS presentation, input and audio remain common services. Research workloads\nand benchmark tools are not required in a distributed runtime.\n\nLocal development needs Rust 1.99 and Wayland, XKB, EGL, GBM, DRM, SDL2 and\nVulkan development libraries. `cargo build --release` builds only the launcher.\n\n```sh\nPYTHONPATH=tools python3 -m unittest discover -s tests\u002Fpython -p 'test_*.py'\ncargo fmt --all --check\ncargo check --workspace --all-targets --all-features\ncargo test --workspace --all-features\ncargo clippy --workspace --all-targets --all-features -- -D warnings\n```\n\n[Venus research tools](docs\u002Fvenus-research.md) cover correctness fixtures,\nperformance comparisons and the private Wine graphics experiment.\n\n## License\n\nThe Rust workspace is AGPL-3.0-only. Linux, QEMU, Mesa, virglrenderer and other\nbundled components retain their upstream licenses. Source notices and dependency\nlicenses accompany the packaged runtime. See `LICENSE` and `NOTICE`.\n","Legion 是一个轻量级 KVM 虚拟机工具，专为在 Linux 主机上运行 Windows 游戏而设计。它通过 Proton 在 KVM 客户机中执行 Windows 应用，集成 Mesa Venus、virtio-GPU 和定制内核，实现 Vulkan 图形直通；主机 GPU 驱动保持原生，不转发 NVIDIA ioctls 或维护驱动 ABI 表。支持 Wayland 桌面、共享目录、输入\u002F音频透传及环境变量控制启动模式。适用于 Steam\u002FLutris\u002FHeroic 等游戏启动器的无缝集成场景，尤其适合需稳定 Vulkan 兼容性与低开销虚拟化的游戏运行环境。","2026-11-24 04:52:19","CREATED_QUERY"]