sqzass.git

sqzass

~ A static site generator written in Rust
git clone https://github.com/debuman/sqzass.git
commit b769b53bb780166f4733c48f03d441e7a8cee435
parent f7c2d41657b22bc97a3bbb9b7c80d3752ba307e1
Author: sqzer <110329244+sqzer-x@users.noreply.github.com>
Date: Fri, 31 Jul 2026 23:10:34 +0900

ARM 리눅스용 바이너리를 릴리스에 추가한다

릴리스가 내는 타깃은 x86_64 리눅스와 Apple Silicon macOS 둘뿐이었다. 그래서
라즈베리파이·Graviton·Ampere 같은 ARM 리눅스에서는 install.sh가 "지원하지 않는
플랫폼"으로 끝나고 소스 빌드밖에 길이 없었다. AUR PKGBUILD는 이미
arch=('x86_64' 'aarch64')로 선언해 두고 있어서, 소스 빌드는 되는데 바이너리
릴리스만 못 따라가던 셈이다.

크로스 컴파일이 아니라 네이티브 ARM 러너에서 짓는다. 크로스로도 바이너리는
나오지만 그러면 "바이너리가 실제로 사이트를 만드는지" 보는 스모크 스텝이 못
돈다. 링크만 되고 런타임에 죽는 조합을 잡으라고 둔 검사인데, 실행할 수 없는
아티팩트를 내보내는 건 그 검사를 포기하는 것이다.

install.sh는 `Linux-aarch64`와 `Linux-arm64`를 함께 받는다. 커널은 보통
aarch64로 답하지만 일부 이미지가 arm64로 답한다.

**타깃이 없는 릴리스를 만났을 때의 안내를 넣었다.** 타깃은 나중에 추가되므로
그 이전 릴리스에는 없고, v0.1.0이 바로 그 경우다. 이걸 잡지 않으면 ARM 사용자가
curl의 404 한 줄만 보고 무엇이 없는 건지 알 수 없다. 지금은 "v0.1.0 릴리스에는
aarch64-unknown-linux-musl 빌드가 없습니다"라고 말하고 소스 빌드로 안내한다.
가짜 uname으로 두 경로를 다 돌려 확인했다.

문서의 "순수 Rust 엔진을 쓰는 유일한 빌드"는 이제 둘이라 복수로 고치고, 타르볼
하나가 Debian·Fedora·Arch에서 그대로 도는 이유(정적 링크라 배포판을 구분하지
않는다)를 한 줄 적었다.

Diffstat:
M.github/workflows/release.yml | 7+++++++
Mdocs/content/start/installation.ko.md | 13+++++++------
Mdocs/content/start/installation.md | 35++++++++++++++++++-----------------
Mdocs/static/install.sh | 12++++++++++++
4 files changed, 44 insertion(+), 23 deletion(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
@@ -30,6 +30,13 @@ jobs:
           - os: ubuntu-latest
             target: x86_64-unknown-linux-musl
             flags: --no-default-features --features pure-rust
+          # ARM 리눅스는 네이티브 러너에서 짓는다. 크로스 컴파일로도 바이너리는
+          # 나오지만, 그러면 아래 스모크 스텝이 못 돈다 — 링크만 되고 런타임에
+          # 죽는 조합을 잡으라고 둔 검사라, 실행할 수 없는 아티팩트를 내보내는
+          # 것은 그 검사를 포기하는 것이다.
+          - os: ubuntu-24.04-arm
+            target: aarch64-unknown-linux-musl
+            flags: --no-default-features --features pure-rust
           - os: macos-latest
             target: aarch64-apple-darwin
             flags: ""
diff --git a/docs/content/start/installation.ko.md b/docs/content/start/installation.ko.md
@@ -15,7 +15,7 @@ curl -fsSL https://sqzass.sqzer.com/install.sh | sh
 ```
 
 스크립트가 하는 일은 정확히 넷이고, 실행 전에 [직접 읽어볼](/install.sh) 수
-있습니다: 플랫폼 판별(Linux x86_64 또는 Apple Silicon macOS), 최신 릴리스
+있습니다: 플랫폼 판별(x86_64 또는 ARM64 리눅스, Apple Silicon macOS), 최신 릴리스
 타르볼과 `.sha256` 다운로드, 체크섬 검증, `/usr/local/bin`에 `install` — sudo는
 그 디렉터리에 쓸 수 없을 때만 묻습니다. 다른 곳에 설치하려면
 `SQZASS_INSTALL_DIR`을 주세요. 그 밖의 일은 하지 않습니다 — 셸 설정도, `PATH`도
@@ -54,9 +54,9 @@ cargo build --release --no-default-features --features pure-rust
 
 ## 미리 빌드된 바이너리
 
-[릴리스](https://github.com/sqzer-x/sqzass/releases)마다 정적 링크된
-`x86_64-unknown-linux-musl` 빌드와 `aarch64-apple-darwin` 빌드가 붙습니다. 각각
-`.sha256`이 옆에 있습니다.
+[릴리스](https://github.com/sqzer-x/sqzass/releases)마다 정적 링크된 리눅스 빌드 둘
+(`x86_64-unknown-linux-musl`, `aarch64-unknown-linux-musl`)과
+`aarch64-apple-darwin` 빌드가 붙습니다. 각각 `.sha256`이 옆에 있습니다.
 
 ```bash
 curl -LO https://github.com/sqzer-x/sqzass/releases/latest/download/sqzass-x86_64-unknown-linux-musl.tar.gz
@@ -65,13 +65,14 @@ sudo install -m755 sqzass-*/sqzass /usr/local/bin/
 ```
 
 리눅스 빌드는 정적이라 glibc를 요구하지 않고, 빌드한 배포판보다 오래된 배포판에서도
-돕니다. 순수 Rust 정규식 엔진을 쓰는 유일한 빌드이기도 합니다 — 다른 모든 곳에서
+돕니다. 타르볼 하나가 Debian에서도 Fedora에서도 Arch에서도 그대로 도는 이유가
+이것입니다. 순수 Rust 정규식 엔진을 쓰는 빌드이기도 합니다 — 다른 모든 곳에서
 sqzass는 코드가 많은 사이트에서 눈에 띄게 빠른 Oniguruma로 강조하는데, Oniguruma는
 C 바인딩이고, musl 정적 빌드를 깨뜨리는 게 바로 C 바인딩입니다. 두 엔진의 문법 집합도
 같지 않습니다. 순수 Rust 엔진이 일부 문법의 정규식을 못 돌리기 때문에 정적
 아티팩트에는 문법 일곱 개가 통째로 빠집니다 — PowerShell, JavaScript (Babel),
 Salt State, ARM Assembly 등이요. 네이티브 빌드가 온전히 칠하는 ` ```powershell `
-이나 ` ```jsx ` 펜스가 정적 아티팩트에서는 에러 없이 평문이 됩니다. ` ```js `
+이나 ` ```jsx ` 펜스가 거기서는 에러 없이 평문이 됩니다. ` ```js `
 조차 마크업 구조가 다릅니다. 네이티브 빌드는 Babel 문법으로, 정적 빌드는 일반
 JavaScript로 해석합니다. 각 바이너리 자체는 여전히 완전히 결정적입니다.
 
diff --git a/docs/content/start/installation.md b/docs/content/start/installation.md
@@ -15,7 +15,7 @@ curl -fsSL https://sqzass.sqzer.com/install.sh | sh
 ```
 
 The script does exactly four things, and you can [read it](/install.sh) first:
-detect the platform (Linux x86_64 or Apple-silicon macOS), download the latest
+detect the platform (Linux on x86_64 or ARM64, or Apple-silicon macOS), download the latest
 release tarball with its `.sha256`, verify the checksum, and `install` the
 binary into `/usr/local/bin` — asking for sudo only if that directory is not
 writable. Set `SQZASS_INSTALL_DIR` to install somewhere else. It touches
@@ -54,9 +54,10 @@ cargo build --release --no-default-features --features pure-rust
 
 ## Prebuilt binaries
 
-Attached to each [release](https://github.com/sqzer-x/sqzass/releases): a
-statically linked `x86_64-unknown-linux-musl` build and an
-`aarch64-apple-darwin` one, each with a `.sha256` beside it.
+Attached to each [release](https://github.com/sqzer-x/sqzass/releases): two
+statically linked Linux builds, `x86_64-unknown-linux-musl` and
+`aarch64-unknown-linux-musl`, and an `aarch64-apple-darwin` one, each with a
+`.sha256` beside it.
 
 ```bash
 curl -LO https://github.com/sqzer-x/sqzass/releases/latest/download/sqzass-x86_64-unknown-linux-musl.tar.gz
@@ -64,19 +65,19 @@ tar xzf sqzass-x86_64-unknown-linux-musl.tar.gz
 sudo install -m755 sqzass-*/sqzass /usr/local/bin/
 ```
 
-The Linux build is static, so it has no glibc requirement and runs on
-distributions older than the one it was built on. It is also the one build
-that uses the pure-Rust regex engine: everywhere else sqzass highlights with
-Oniguruma, which is measurably faster on code-heavy sites, but Oniguruma is a
-C binding and a C binding is exactly what breaks a musl static build. The
-engines' grammar sets are not identical either: the pure-Rust engine cannot
-run a few grammars' regexes, so the static artifact drops seven of them
-entirely — PowerShell, JavaScript (Babel), Salt State and ARM Assembly among
-them. A ` ```powershell ` or ` ```jsx ` fence that a native build highlights
-in full falls back to plain text in the static artifact, without an error.
-Even ` ```js ` differs in markup structure: the native build resolves it to
-the Babel grammar, the static one to plain JavaScript. Each binary is still
-fully deterministic on its own.
+The Linux builds are static, so they have no glibc requirement and run on
+distributions older than the one they were built on — which is also why one
+tarball covers Debian, Fedora and Arch alike. They are the builds that use the
+pure-Rust regex engine: everywhere else sqzass highlights with Oniguruma, which
+is measurably faster on code-heavy sites, but Oniguruma is a C binding and a C
+binding is exactly what breaks a musl static build. The engines' grammar sets
+are not identical either: the pure-Rust engine cannot run a few grammars'
+regexes, so the static artifacts drop seven of them entirely — PowerShell,
+JavaScript (Babel), Salt State and ARM Assembly among them. A ` ```powershell `
+or ` ```jsx ` fence that a native build highlights in full falls back to plain
+text there, without an error. Even ` ```js ` differs in markup structure: the
+native build resolves it to the Babel grammar, the static ones to plain
+JavaScript. Each binary is still fully deterministic on its own.
 
 ## Checking the install
 
diff --git a/docs/static/install.sh b/docs/static/install.sh
@@ -9,8 +9,11 @@ set -eu
 
 repo="sqzer-x/sqzass"
 
+# 리눅스 ARM은 커널이 `aarch64`로 답하지만, 32비트 유저스페이스를 얹은 이미지 등
+# 일부는 `arm64`로 답한다. 둘 다 같은 아티팩트다.
 case "$(uname -s)-$(uname -m)" in
   Linux-x86_64) target="x86_64-unknown-linux-musl" ;;
+  Linux-aarch64 | Linux-arm64) target="aarch64-unknown-linux-musl" ;;
   Darwin-arm64) target="aarch64-apple-darwin" ;;
   *)
     echo "지원하지 않는 플랫폼입니다: $(uname -s) $(uname -m)" >&2
@@ -35,6 +38,15 @@ url="https://github.com/$repo/releases/download/$tag/$name.tar.gz"
 tmp="$(mktemp -d)"
 trap 'rm -rf "$tmp"' EXIT
 
+# 릴리스에 이 타깃이 없을 수 있다 — 타깃이 나중에 추가되면 그 이전 릴리스에는
+# 없다. 여기서 잡지 않으면 curl의 한 줄짜리 실패만 보이고, 무엇이 없는 건지
+# 알 수 없다.
+if ! curl -fsLI -o /dev/null "$url" 2>/dev/null; then
+  echo "$tag 릴리스에는 $target 빌드가 없습니다." >&2
+  echo "소스에서 빌드하세요: https://sqzass.sqzer.com/start/installation/" >&2
+  exit 1
+fi
+
 echo "받는 중: $url"
 curl -fsSL -o "$tmp/$name.tar.gz" "$url"
 curl -fsSL -o "$tmp/$name.tar.gz.sha256" "$url.sha256"