hydra/README.md
Chubby dbe3cb61d4
ci: commit prebuilt torrent bridge binaries (#2878)
* ci: commit prebuilt torrent bridge binaries

Installs no longer compile libtorrent, Boost and OpenSSL through vcpkg on
Windows x64 and Linux x64. A cold vcpkg cache, as after every runner image
update, made the install step take ~35 minutes on Windows.

- scripts/torrent-bridge-prebuilt.cjs uses the committed bundle in
  native/torrent-bridge/prebuilt when its input hash matches, and falls back
  to the source build otherwise. HYDRA_TORRENT_BRIDGE_FROM_SOURCE=1 forces
  the source build.
- The "Torrent bridge prebuilts" workflow rebuilds the bundles when a branch
  push changes the bridge inputs and commits them to that branch.
- Build and release workflows skip the vcpkg cache when the bundle is current.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(torrent-bridge): update prebuilt binaries

Built by https://github.com/hydralauncher/hydra/actions/runs/38007780411

* ci: ship torrent bridge notices as one file

The bridge bundles carried one license file per vcpkg port, 150 files in
all. Each bundle now holds a single THIRD_PARTY_NOTICES.txt: ports with the
same license text (all of Boost) share a section, and vcpkg-* build helper
ports, which ship nothing, are left out. Source builds write the same file
into hydra-native.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(torrent-bridge): update prebuilt binaries

Built by https://github.com/hydralauncher/hydra/actions/runs/38008319588

* ci: rename torrent bridge jobs so they don't match required checks

Required checks on main match job names from any workflow, so the bridge
jobs named build (ubuntu-latest) and build (windows-2022) counted as the
required Build checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: keep each torrent bridge artifact to its own platform

Each job uploaded the whole prebuilt folder, so the other platform's
committed bundle from the checkout came along and could overwrite the fresh
one when the artifacts merged. That left a stale Windows bundle on this
branch. Jobs now drop the committed bundles before building, and the commit
job verifies every bundle against the inputs. Changes to the workflow
itself also rebuild the bundles.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* chore(torrent-bridge): update prebuilt binaries

Built by https://github.com/hydralauncher/hydra/actions/runs/38008653533

* ci: address torrent bridge prebuilt review

- Skip the prebuilt bridge when HYDRA_TORRENT_SANITIZE=1, so sanitizer
  builds still compile and test the bridge.
- On Linux, check the bundle with ldd and build from source when this
  system lacks the glibc or libstdc++ versions it needs.
- `check` reports the same decision as the install, so forced source builds
  keep the vcpkg cache.
- Pin the actions in the prebuilt workflow to commit SHAs.
- Skip rebuilding when every committed bundle already matches its inputs,
  since MSVC output differs on every build. Manual runs still rebuild.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(native): wait for Electron to install before loading the addon

Yarn starts the root postinstall alongside Electron's, which downloads the
runtime and only then writes path.txt. Compiling the torrent bridge used to
take long enough to hide that; with the prebuilt bridge, the load check ran
first and failed with "Electron failed to install correctly".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: fix lint and Sonar findings in the bridge scripts

- Rename usePrebuiltTorrentBridge to installPrebuiltTorrentBridge; the use
  prefix made rules-of-hooks treat it as a React hook.
- Sort hash inputs with an explicit code-unit compare.
- Run ldd from /usr/bin or /bin instead of searching PATH.
- Wait for Electron with an interval instead of awaiting in a loop.
- Normalize line endings with replaceAll.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Chubby Granny Chaser <hydralauncher@proton.me>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: github-actions[bot] <41898283+github-actions[bot]@users.noreply.github.com>
2026-10-10 02:02:37 +01:00

2.7 KiB

Hydra Launcher

Hydra Launcher is an open-source gaming platform created to be the single tool that you need in order to manage your gaming library. Hydra is written in Node.js (Electron, React, Typescript) and Rust, with libtorrent providing the torrent engine.

build release chocolatey

Hydra Launcher Home Page

Features

  • Add games that you own to your library
  • Have a nice profile that shows what you are playing to your friends
  • Save your game progress in the cloud with Hydra Cloud
  • Unlock achievements
  • Navigate through a rich catalogue with a powerful suggestion algorithm
  • Discover new games that you haven't played before

Build from source and contributing

Please, refer to our Documentation pages: docs.hydralauncher.gg

Local development requirements

  • Node.js + Yarn
  • Rust toolchain (for hydra-native)
  • Git and a C++ toolchain (Visual Studio C++ Build Tools on Windows, GCC/Clang on Linux, Xcode command-line tools on macOS). The native build obtains CMake and CTest automatically through vcpkg.

After installing dependencies, postinstall now builds the Rust native addon automatically (hydra-native/hydra-native.node).

The native build includes a Rust wrapper around pinned libtorrent. Development and packaged torrenting no longer require Python.

On Windows x64 and Linux x64, the libtorrent bridge comes prebuilt from native/torrent-bridge/prebuilt, so installs skip compiling libtorrent through vcpkg. Other platforms build it from source. When a branch push changes native/torrent-bridge or scripts/build-torrent-bridge.cjs, the "Torrent bridge prebuilts" workflow rebuilds the binaries and commits them to that branch; until then, installs build the bridge from source. Set HYDRA_TORRENT_BRIDGE_FROM_SOURCE=1 to always build it from source.

Contributors

License

Hydra is licensed under the MIT License.