Skip to content

build: cross-platform 'just use-local' via rust-script installer#580

Merged
githubrobbi merged 2 commits into
mainfrom
build/use-local-cross-platform
Jul 23, 2026
Merged

build: cross-platform 'just use-local' via rust-script installer#580
githubrobbi merged 2 commits into
mainfrom
build/use-local-cross-platform

Conversation

@githubrobbi

Copy link
Copy Markdown
Collaborator

just use-local was a [unix]-gated bash shebang recipe — advertised in help.just and referenced by analysis.just / bench_uffs.just, but absent on Windows: a just shebang recipe hands bash a raw C:\... temp path whose backslashes bash eats (exit 127), and a plain bash script.sh line resolves to WSL's cargo-less System32 bash.

The recipe body now lives in scripts/dev/install-bins.rs (rust-script, zero dependencies — already the established pattern throughout scripts/dev/), and the recipe becomes one platform-neutral line.

What the script does:

  • Stops the resident daemon + MCP first (10s-capped uffs --daemon kill, then pkill/taskkill for uffsd/uffsmcp, all best-effort) — preserving the old recipe's step 0, and required on Windows where a running .exe is file-locked.
  • One cargo build --release --workspace.
  • Installs every binary cargo reports having built, discovered via --message-format=json (instant from cache) rather than a hardcoded list or target/release globbing — a new [[bin]] anywhere in the workspace is picked up automatically, and .exe handling comes free.
  • Fresh-inode copy (remove before copy) so macOS cannot re-use a path-cached Launch Services deny verdict against an earlier broken copy at the same path.
  • Warns when ~/bin is not on PATH.

Verified: script compiles standalone with plain rustc (no external deps), just -n use-local resolves, REUSE header matches build-local.rs.

The two intermediate messages of the read fallback cascade ('IOCP
inline read failed — trying fallback strategies' and 'Fallback 1
($MFT file) failed — trying unbuffered volume I/O') fired at WARN,
piercing quiet (WARN-default) subscribers on every run that walked the
chain — flagged by the content-service team as upstream mis-leveling.

The cascade is designed, automatically-handled resilience: a normal
run should stay silent, and -v/verbose reveals the chain when
debugging. Both messages are now INFO with byte-identical text (log
greps keep working). A chain that exhausts every fallback still
propagates a real error to the caller.
'just use-local' was a [unix]-gated bash shebang recipe — advertised in
help.just and referenced by analysis.just / bench_uffs.just, but absent
on Windows, where a just shebang recipe hands bash a raw C:\... temp
path whose backslashes bash eats (exit 127), and a plain 'bash
script.sh' line resolves to WSL's cargo-less System32 bash.

The recipe body now lives in scripts/dev/install-bins.rs (rust-script,
zero dependencies — ported from the uffs-products install flow, minus
the demo/full flavor split which is a products-only concept):

- stops the resident daemon + MCP first (10s-capped 'uffs --daemon
  kill', then pkill/taskkill), preserving the old recipe's step 0 —
  required on Windows, where a running .exe is file-locked;
- one 'cargo build --release --workspace';
- installs EVERY binary cargo reports having built, discovered via
  --message-format=json (instant from cache) instead of a hardcoded
  list or target/release globbing — a new [[bin]] anywhere in the
  workspace is picked up automatically, .exe handling comes free;
- fresh-inode copy (rm before cp) so macOS cannot re-use a path-cached
  Launch Services deny verdict against an earlier broken copy;
- warns when ~/bin is not on PATH.

The [unix] bash recipe is replaced by a single platform-neutral
'use-local: rust-script scripts/dev/install-bins.rs'.
@githubrobbi
githubrobbi enabled auto-merge July 23, 2026 14:31
@githubrobbi
githubrobbi added this pull request to the merge queue Jul 23, 2026
Merged via the queue into main with commit 20ef26f Jul 23, 2026
21 checks passed
@githubrobbi
githubrobbi deleted the build/use-local-cross-platform branch July 23, 2026 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant