# ── NO SIBLING PATCHES AT THE ROOT (B7, after the owner's publish of 2026-10-26) ──
#
# The root workspace is the open core: it builds from crates.io in every checkout, a
# lone clone and an estate checkout alike, and its committed lock is the crates.io
# lock. The estate's sibling patches (`.cargo/estate-siblings.toml`) apply only to the
# estate workspaces, as `[patch.crates-io]` in `estate/Cargo.toml` and
# `holger-estate-front/Cargo.toml` (`xtask/tests/lone_clone.rs`). A change in a sibling
# (monetize, edda, Skidbladnir ...) reaches the root after it is published; the estate
# workspaces see it at once.
[alias]
# The launcher, `xtask/boot` (a detached workspace with no dependency): it starts even
# where the root workspace cannot resolve yet, refreshes `siblings.toml`, and hands
# every verb but `siblings` to the real `xtask`. Run from the repository root.
xtask = "run --quiet --manifest-path xtask/boot/Cargo.toml --"
# ── the musl appliance target (the 14th atom, `mvp-server-musl`) ──────────────
# The DECLARED toolchain surface, and it has ONE WRITER: rustc. `rust-lld` is
# the linker and `link-self-contained=yes` hands rustc the crt objects, libc.a
# AND libunwind.a out of its own sysroot
# (~/.rustup/toolchains/*/lib/rustlib/x86_64-unknown-linux-musl/lib/self-contained/).
# No external C toolchain is consulted at link time at all.
#
# WHY THIS REPLACED `x86_64-linux-musl-gcc` + `link-self-contained=no`
# (measured 2026-08-15, on THIS box, with the REAL `holger-mvp` appliance
# binary — not a hello-world; a hello-world is what made this look solved
# once before):
#
# The old pair named a cross toolchain that does not exist here. Debian's
# musl-tools installs /usr/bin/x86_64-linux-musl-gcc as a SHELL WRAPPER —
# `exec x86_64-linux-gnu-gcc "$@" -specs .../musl-gcc.specs` — so the actual
# linker is GNU ld.bfd, and /usr/lib/x86_64-linux-musl/ ships libc.a but NO
# libunwind.a. With self-contained=no rustc emits a bare `-lunwind` for that
# toolchain to satisfy, and nothing can:
#
# error: linking with `x86_64-linux-musl-gcc` failed: exit status: 1
# /usr/bin/x86_64-linux-gnu-ld.bfd: cannot find -lunwind: No such file or directory
# /usr/bin/x86_64-linux-gnu-ld.bfd: have you installed the static version of
# the unwind library ?
#
# So the build did not fail LOUDLY-and-correctly the way the old comment
# claimed ("x86_64-linux-musl-gcc: not found"): the name RESOLVED, to a
# glibc gcc in musl clothing, and died one layer deeper on a missing archive.
# A fail-loud floor that a wrapper script can walk through is not a floor.
#
# THE DUPLICATE-`_start` COLLISION (measured 2026-08-13) DOES NOT REOCCUR, and
# the reason is structural rather than lucky. That collision was TWO owners of
# crt: the zig/gcc driver supplying its Scrt1.o AND rustc supplying its own.
# Flipping only `link-self-contained` back to `yes` while a cc driver still
# linked would have re-armed exactly that. Flipping BOTH knobs together
# removes the second owner instead of adding one — rust-lld is invoked
# directly, no cc driver contributes objects. Verified on the applied output,
# not inferred (2026-08-15):
#
# $ file .../x86_64-unknown-linux-musl/release/holger-mvp
# ELF 64-bit LSB pie executable, x86-64, static-pie linked, not stripped
# $ readelf -l holger-mvp | grep -c INTERP -> 0
# $ readelf -sW holger-mvp | grep -w _start | wc -> 1 (ONE definition)
# $ ldd holger-mvp -> statically linked
# $ ./holger-mvp --version -> holger v0.6.9 (a4351fd)
#
# That closure is the real one: openzl-sys-rs (C/C++ via cmake), ring, zstd,
# liblzma, blake3, boringtun — all compile and link.
#
# FAIL-LOUD, BY CONSTRUCTION. The old design could fail silently-wrong because
# it depended on an ambient toolchain whose name it could not verify. This one
# has nothing ambient to be missing: rust-lld ships inside the same rustup
# toolchain as the target's libstd, so either `rustup target add
# x86_64-unknown-linux-musl` has been run (and the link works) or rustc says
# "can't find crate for `core`" before a linker is ever spawned — the case
# korp-installer's pid1build.rs preflight already names by hand.
#
# The zig recipe in .nornir/build-variants.toml §musl still WORKS and is still
# a legitimate cross environment; it is simply no longer REQUIRED. A box that
# wants it overrides this target block per-invocation:
# CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=x86_64-linux-musl-gcc \
# CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="-C link-self-contained=no"
[target.x86_64-unknown-linux-musl]
linker = "rust-lld"
rustflags = ["-C", "link-self-contained=yes"]