{"id":52091276,"url":"https://github.com/aether-lang-dev/aether-crossbuild","last_synced_at":"2026-08-04T06:01:27.418Z","repository":{"id":370842318,"uuid":"1297332819","full_name":"aether-lang-dev/aether-crossbuild","owner":"aether-lang-dev","description":"Aether rests on this to compile Mac/Win Arm/AMD from Linux containers (and more)","archived":false,"fork":false,"pushed_at":"2026-07-25T12:01:11.000Z","size":74,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-07-31T20:22:02.419Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aether-lang-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null,"disclosure":null}},"created_at":"2026-07-11T10:10:11.000Z","updated_at":"2026-07-31T17:29:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/aether-lang-dev/aether-crossbuild","commit_stats":null,"previous_names":["aether-lang-org/aether-crossbuild","aether-lang-dev/aether-crossbuild"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aether-lang-dev/aether-crossbuild","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aether-lang-dev%2Faether-crossbuild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aether-lang-dev%2Faether-crossbuild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aether-lang-dev%2Faether-crossbuild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aether-lang-dev%2Faether-crossbuild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aether-lang-dev","download_url":"https://codeload.github.com/aether-lang-dev/aether-crossbuild/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aether-lang-dev%2Faether-crossbuild/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36263568,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-08-04T02:00:06.901Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-08-04T06:01:26.886Z","updated_at":"2026-08-04T06:01:27.411Z","avatar_url":"https://github.com/aether-lang-dev.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# aether-crossbuild\n\nMaintainer tooling that **cross-builds the external C dependencies** Aether's\nstandard library links against — `zlib`, `pcre2`, `nghttp2`, `openssl` — for\neach supported OS × CPU target, producing per-target **sysroots** that let\n`ae build --target=\u003ctriple\u003e` link a dependency-heavy Aether program from a\nsingle Linux build agent.\n\n\u003e **This is not a dependency, and it does not ship binaries.** It is a\n\u003e *from-source build orchestrator* you run **occasionally, by hand, on trusted\n\u003e developer infrastructure**. The sysroots it produces are `.gitignore`d and\n\u003e never published — see [WHY-NOT-PUBLISHED.md](WHY-NOT-PUBLISHED.md) for the\n\u003e licensing reasoning (short version: we build permissive libraries from source,\n\u003e we never touch or store Apple SDK material, and the only redistributable blob\n\u003e is the freely-licensed FreeBSD base). End users never run this; they set\n\u003e `--target` and their toolchain does the rest.\n\n## Why this exists\n\nAether compiles to C, so cross-compiling to another OS/CPU is a *link-time*\noperation — a Linux x86_64 box can link a mac-arm64 binary without running a\nsingle arm64 instruction. `zig cc` supplies the compiler, the target libc, and\n(for macOS) the system-stub SDK, so the **system** libraries come free. But a\nprogram that uses `std.http` or `std.cryptography` also links `openssl`,\n`nghttp2`, `zlib`, `pcre2` — third-party libraries that must exist *for the\ntarget* on the build agent. That's what this repo produces.\n\nPrograms that use none of those subsystems need no sysroot at all — `ae build\n--target=...` links them with `-lm` only. This repo is only for the\ndependency-heavy tier.\n\n## The matrix\n\nFour libraries × eight targets. The targets split into two tiers by effort:\n\n| Tier | Targets | Base sysroot needed? |\n|---|---|---|\n| **A — turnkey** | `x86_64-macos`, `aarch64-macos`, `x86_64-linux-gnu`, `aarch64-linux-gnu`, `x86_64-linux-musl`, `aarch64-linux-musl` | No — `zig cc` bundles libc / macOS SDK stubs |\n| **B — needs a base sysroot** | `x86_64-freebsd`, `aarch64-freebsd` (or version-pinned `…-freebsd15`) | Yes — extract FreeBSD `base.txz` once per CPU (BSD-licensed, freely redistributable) |\n\n\u003e **FreeBSD versions.** `zig cc` bundles a FreeBSD-14 libc, so the plain\n\u003e `…-freebsd` triple links against 14. Targeting a 15-only kernel surface\n\u003e (`sys/jail.h`, `sys/rctl.h`, Capsicum structs) needs the matching base: run\n\u003e `./scripts/fetch-freebsd-base.sh x86_64 15` (a version-suffixed `deps.lock`\n\u003e pin + `bases/x86_64-freebsd15/`), then `./provision.sh x86_64-freebsd15`. The\n\u003e version rides the base-sysroot dir only; the compiler triple stays\n\u003e `x86_64-freebsd`.\n\n## Usage\n\n```sh\n# One-time: fetch the pinned zig toolchain into ./toolchain/\n./scripts/get-zig.sh\n\n# Build all four deps for one target into ./sysroots/\u003ctriple\u003e/\n./provision.sh aarch64-macos\n\n# ...or every target in the matrix (slow — openssl dominates):\n./provision.sh --all\n\n# FreeBSD targets need a base sysroot first (one-time per CPU):\n./scripts/fetch-freebsd-base.sh aarch64      # populates ./bases/aarch64-freebsd/\n./provision.sh aarch64-freebsd\n```\n\nOutput layout (each target self-contained, ready for `--sysroot`):\n\n```\nsysroots/aarch64-macos/\n├── include/        # openssl/*, pcre2.h, zlib.h, nghttp2/*\n├── lib/            # libcrypto.a libssl.a libpcre2-8.a libz.a libnghttp2.a\n└── licenses/       # upstream LICENSE/NOTICE per lib (attribution obligation)\n```\n\nPoint `ae build` at it:\n\n```sh\nae build --target=aarch64-macos --sysroot=\"$PWD/sysroots/aarch64-macos\" app.ae\n```\n\n## Reproducibility\n\nDependency versions are pinned in [`deps.lock`](deps.lock). Two maintainers\nrunning `./provision.sh \u003ctriple\u003e` from the same lock produce byte-comparable\nsysroots. Agreeing on the *lock* (versions + recipe) is the coordination point —\nnot on hoarding or sharing built artifacts.\n\n## Validation status\n\nThe cross-build recipe is proven end-to-end for the two riskiest libraries on a\nLinux x86_64 host with `zig cc` (no macOS involved):\n\n- **pcre2 → mac-arm64**: `Mach-O 64-bit arm64` static lib. ✅ built \u0026 verified.\n- **openssl → mac-arm64**: `libcrypto.a` / `libssl.a`, `Mach-O 64-bit arm64`.\n  ✅ built \u0026 verified — **with a required fix**: openssl's macOS path\n  `#include`s `\u003cCommonCrypto/CommonCryptoError.h\u003e`, an Apple-framework header\n  `zig cc` does not ship. We disable it with `-DOPENSSL_NO_APPLE_CRYPTO_RANDOM`\n  (openssl falls back to `getentropy`/`arc4random`, both in libSystem). This is\n  also the right call for the \"never touch Apple SDK\" policy — see\n  `recipes/openssl.sh` and WHY-NOT-PUBLISHED.md.\n\nzlib and nghttp2 use the standard `CHOST` / autoconf `--host` cross patterns and\nare wired accordingly; validate on first real run.\n\n## Layout\n\n```\nprovision.sh              # orchestrator: provision.sh \u003ctriple\u003e | --all\ndeps.lock                 # pinned versions + source URLs + sha256\nrecipes/\n├── common.sh             # zig-cc wrappers, triple↔autoconf-host mapping, helpers\n├── zlib.sh   pcre2.sh   nghttp2.sh   openssl.sh\nscripts/\n├── get-zig.sh            # fetch+verify the pinned zig tarball\n└── fetch-freebsd-base.sh # extract FreeBSD base.txz into ./bases/\u003ccpu\u003e-freebsd/\nWHY-NOT-PUBLISHED.md      # the licensing boundary — read before adding a release\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faether-lang-dev%2Faether-crossbuild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faether-lang-dev%2Faether-crossbuild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faether-lang-dev%2Faether-crossbuild/lists"}