Add rolling release built with Zig's musl toolchain
Rolling Release / build (push) Successful in 1m40s
Rolling Release / publish (push) Successful in 8s

Build a static Linux x86_64 binary with zig cc, linking OpenSSL in and
serving it to moonbitlang/async through a dlopen shim. CI publishes it to
the rolling release on every push to main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
nandiandClaude Opus 5.5 committed 2026-11-30 16:50:10 -08:00
1 parent 3ca9e8ed1d
commit 2d815bbb75
9 files changed
+368

No files matched your search

+22
View File
@@ -146,6 +146,28 @@ docker run -d -p 5000:5000 registry:2
orbit channel add local localhost:5000/pkgs --plain-http
```
## Rolling release
Every push to `main` that passes the tests replaces the
[`rolling` release](https://git.site.latha.org/nandi/orbit/releases/tag/rolling)
with a static Linux x86_64 binary. It doesn't need glibc or OpenSSL, only `tar`,
`/bin/sh`, and the system's CA certificates (`ca-certificates` on most distros;
set `SSL_CERT_FILE` if they live somewhere unusual).
```sh
base=https://git.site.latha.org/nandi/orbit/releases/download/rolling
curl -fLO "$base/orbit-linux-x86_64" -fLO "$base/SHA256SUMS" &&
sha256sum -c SHA256SUMS &&
install -Dm755 orbit-linux-x86_64 ~/.local/bin/orbit
```
`just build-musl` makes the same binary locally in `dist/`. It needs `zig`,
`perl`, `make`, and `curl`. [scripts/build-musl.sh](scripts/build-musl.sh) compiles
MoonBit's C output and a pinned OpenSSL with `zig cc -target x86_64-linux-musl`.
`moonbitlang/async` normally loads OpenSSL with `dlopen`, which static binaries
can't do, so [openssl_static.c](scripts/musl/openssl_static.c) supplies the
linked-in functions instead.
## Building
```sh