makepad/libs/relax/compiler/tests/registry_fetch/run.sh
Admin b22a714840 makepad run: the Rust JIT (libs/relax) and makepad-remote
The JIT that runs makepad apps from source: lexer, front end, type checker,
lazy borrow checker (Gandalf; `--check-first` opts in), codegen, session and
warm/cold caches keyed by compiler stamp, provided crates bound late,
startup images, live patching. User-facing name is `makepad run` (binary
`makepad`, MAKEPAD_RUN_* env, ~/.makepad-run); libs/relax stays the internal
library name. `makepad check` reports rustc-style diagnostics with rustc
error codes and checks a whole workspace (`--workspace`). Runs on macOS,
Linux, Windows and Android. makepad-remote: one tool schema for apps and the
WM (app/1): grabs, captures, traces, frame profiles and tweaks.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-13 12:26:21 +02:00

17 lines
1.2 KiB
Bash
Executable file

#!/bin/bash
# usage: run.sh <makepad binary>: NETWORK TEST (node 165 only, not in the default test list): a program whose
# crates.io dependencies (fnv, cfg-if) are neither vendored nor in CARGO_HOME, without Cargo.lock --
# Relax fetches the sparse index entries and the .crate files (SHA-256 checked), unpacks them into a
# private cache, runs the program; then again with MAKEPAD_RUN_OFFLINE=1 from that cache alone.
# Prints "registry_fetch: ok" or "registry_fetch: FAILED" (exit 1).
H=$(cd "$(dirname "$0")" && pwd)
export MAKEPAD_RUN_CACHE=off
E=$H/target/empty-cargo-home
C=$H/target/relax-cache
mkdir -p "$E" "$C"
ONLINE=$(cd "$H/app" && CARGO_HOME=$E MAKEPAD_RUN_CACHE_DIR=$C MAKEPAD_RUN_STD=$H/../../std "$1" run --quiet registry-fetch-app 2>&1 | grep -v '^relax-\|^makepad \(run\|check\|live\|fix\):')
OFFLINE=$(cd "$H/app" && MAKEPAD_RUN_OFFLINE=1 CARGO_HOME=$E MAKEPAD_RUN_CACHE_DIR=$C MAKEPAD_RUN_STD=$H/../../std "$1" run --quiet registry-fetch-app 2>&1 | grep -v '^relax-\|^makepad \(run\|check\|live\|fix\):')
echo "online: $ONLINE"
echo "offline: $OFFLINE"
ls "$C/registry/src"
if [ "$ONLINE" = "registry ok 1f7ee31195fe8f49 64" ] && [ "$OFFLINE" = "$ONLINE" ]; then echo "registry_fetch: ok"; else echo "registry_fetch: FAILED"; exit 1; fi