Installing Trine

Every release has prebuilt Trine for:

platformfile
Linux x86-64 (glibc 2.35 or newer: Ubuntu 22.04, Debian 12, Fedora 36 and later)trine-x86_64-unknown-linux-gnu.tar.gz
Linux arm64 (the same)trine-aarch64-unknown-linux-gnu.tar.gz
macOS on Apple silicontrine-aarch64-apple-darwin.tar.gz
macOS on Inteltrine-x86_64-apple-darwin.tar.gz
Windows x64 (also runs on Windows on Arm)trine-x86_64-pc-windows-msvc.zip

Trine is one program. It runs programs without anything else installed; native builds (trine build) also need a C compiler (Clang or GCC), which trine toolchain looks for.

Linux and macOS

curl -fsSL https://raw.githubusercontent.com/koongipaloongi/trine/main/install.sh | sh

This downloads the build for your machine from the latest release, checks it against the release's SHA256SUMS, and puts it in ~/.trine/bin/trine. It changes nothing else: it prints the line to add to your shell's startup file so trine is on your PATH.

Updating is running it again. Uninstalling is rm -rf ~/.trine (and the PATH line).

Windows

In PowerShell:

powershell -ExecutionPolicy Bypass -c "irm https://raw.githubusercontent.com/koongipaloongi/trine/main/install.ps1 | iex"

This downloads the Windows build from the latest release, checks it against SHA256SUMS, installs it to %LOCALAPPDATA%\trine\bin\trine.exe and adds that folder to your user PATH (open a new terminal afterwards). The same settings work: $env:TRINE_VERSION, $env:TRINE_INSTALL, and $env:TRINE_NO_PATH = "1" to leave the PATH alone.

Native builds on Windows need Clang: winget install LLVM.LLVM, or "C++ Clang tools for Windows" in the Visual Studio Installer.

Uninstall: delete %LOCALAPPDATA%\trine and remove its bin from your user PATH (Settings > System > About > Advanced system settings > Environment Variables).

By hand

Download the archive for your platform and SHA256SUMS from the release, check it (sha256sum -c SHA256SUMS --ignore-missing, or Get-FileHash on Windows), unpack it and put trine (or trine.exe) anywhere on your PATH.

Checking where a build came from. Each archive has a signed build attestation, made by the release workflow on GitHub's machines from the tagged source. With the GitHub CLI:

gh attestation verify trine-x86_64-unknown-linux-gnu.tar.gz --repo koongipaloongi/trine

This proves the file was built by this repository's release workflow at that tag, not just that it matches a checksum published next to it.

Homebrew and winget

brew install koongipaloongi/trine/trine      # macOS and Linux, from the tap koongipaloongi/homebrew-trine
winget install koongipaloongi.Trine          # Windows, once accepted into winget's catalog

Each release carries a Homebrew formula (trine.rb) and winget manifests (koongipaloongi.Trine*.yaml), generated from its checksums by tools/package_manifests.py. Publishing them (maintainers):

Both pin each archive's checksum, so a published release's files must not change: the release workflow refuses to replace them unless it is run with replace ticked, and then the tap and winget need the new files too.

From source

With Rust installed:

git clone https://github.com/koongipaloongi/trine
cd trine
cargo build --release      # the program is target/release/trine
cargo install --path .     # or: put it in ~/.cargo/bin

Trine has no dependencies beyond Rust's standard library. Other platforms Rust supports generally work too (native builds need a C compiler for them).

How releases are made

Publishing a GitHub release runs .github/workflows/release.yml: it builds the tag on each platform above (Linux on Ubuntu 22.04 for the older glibc; Windows with the C runtime linked in, so no Visual C++ redistributable is needed), smoke-tests each build, packs it with the licenses, README and changelog, records a signed attestation, attaches the archives, SHA256SUMS, the Homebrew formula and the winget manifests to the release, and then installs the published release with install.sh and install.ps1 (Windows PowerShell 5.1 and PowerShell 7) on every platform, including a download whose checksum doesn't match, which must be refused.