[Feature]: Support the LoongArch (龙芯) architecture
Author: xuxiaowei-com-cnCreated Sep 1, 2026Updated Sep 1, 2026
Labelsenhancement
Is your feature request related to a problem?
Yes. witr currently only publishes release binaries for amd64 and arm64
(.goreleaser.yml), and both the install script and the manual download
instructions reject LoongArch machines:
$ curl -fsSL https://raw.githubusercontent.com/pranshuparmar/witr/main/install.sh | bash
Unsupported architecture: loongarch64
LoongArch (loong64) is a mature, widely deployed architecture in China
(Loongson 龙芯 3A5000/3A6000 and newer) and is supported by mainstream
distributions such as Loongnix, Deepin, UOS, Kylin, Arch Linux, Fedora and the
Debian loong64 port. Users on these machines cannot install witr from the
official release assets.
Describe the solution you'd like
Add Linux/LoongArch support end to end:
- Releases: add
linux_loong64to the GoReleaser build targets so release binaries (and thedeb/rpm/apkpackages) are published for LoongArch. - Install script: detect
loongarch64/loong64ininstall.shand downloadwitr-linux-loong64. - CI: cross-compile
linux/loong64in the smoke tests and lint thelinux/loong64build in the PR checks so regressions are caught. - Docs: document
loong64in the README platform matrix, manual install steps, the Nix flake systems and the contributor cross-compile checklist.
Additional context
- The Go toolchain has supported
GOOS=linux GOARCH=loong64since Go 1.19; witr already requires Go 1.25, so no toolchain change is needed. - witr's per-platform Go files are selected by GOOS (
*_linux.go), so thelinux/loong64build reuses the existing Linux code path unchanged. - Verified locally:
GOOS=linux GOARCH=loong64 CGO_ENABLED=0 go build ./cmd/witrproduces a valid statically-linked LoongArch ELF binary. - GitHub-hosted runners are x86_64/arm64, so the CI check cross-compiles and inspects the artifact instead of executing it.
Source: pranshuparmar/witr