tawasuyu

sergio/takana

> Una distribución Linux construida con un laboratorio funcional y hermético en el > sótano, y una terminal mutable, clásica y anárquica en el piso de arriba — diseñada > desde el suelo para que una IA programadora entienda, modifique y co…

TOML 1184Shell 70Rust 62Markdown 501503 Definitions

⎇ 71ec92345fb7e6138ad9df720569f7383f90745e scripts/rust-frontier/run-xpy.sh Shell · 35 lines · 1.2 KB History raw

selfhost-verify: climb rust 1.90→1.91.0→1.91.1 COMPLETO (toolchain self-hosted) 526141a05 · sergio ·

1#!/bin/sh
2# Run rust's x.py inside the Alpine devfs sandbox (musl, 256-TLS loader, gcc),
3# pointed at the mrustc-bootstrapped stage0. Hermetic: vendored deps, external LLVM.
4# Usage: run-xpy.sh <SRCDIR> <PREFIXDIR> -- <x.py args...>
5#   SRCDIR    : host path to the rust source tree (mounted at /src)
6#   PREFIXDIR : host path for the install prefix   (mounted at /out)
7set -eu
8ROOT=/home/sergio/hammer
9DEVFS=$ROOT/.dev-fs/alpine
10MRUSTC=$ROOT/.scratch/mrustc
11SRC=${1:?src dir required}; shift
12PREFIX=${1:?prefix dir required}; shift
13[ "${1:-}" = "--" ] && shift
14
15# Optional read-only stage0 prefix (a prior hop's installed toolchain), bound at
16# /stage0 when STAGE0 is set in the environment. bootstrap.toml's build.rustc can
17# then reference /stage0/bin/rustc for a climb hop.
18STAGE0_BIND=""
19[ -n "${STAGE0:-}" ] && STAGE0_BIND="--ro-bind $STAGE0 /stage0"
20
21exec bwrap \
22  --bind "$DEVFS" / \
23  --bind "$MRUSTC" /mrustc \
24  --bind "$SRC" /src \
25  --bind "$PREFIX" /out \
26  $STAGE0_BIND \
27  --dev /dev --proc /proc \
28  --tmpfs /tmp --tmpfs /run \
29  --setenv PATH /usr/bin:/bin:/usr/sbin:/sbin \
30  --setenv HOME /root \
31  --setenv TMPDIR /tmp \
32  --setenv CC gcc --setenv CXX g++ \
33  --setenv RUST_BACKTRACE 1 \
34  --chdir /src \
35  python3 x.py "$@"