Skip to content

Update nix flake + rust to 1.96.1 - #3810

Merged
insipx merged 1 commit into
mainfrom
push-quotuxqwplul
Jul 2, 2026
Merged

Update nix flake + rust to 1.96.1#3810
insipx merged 1 commit into
mainfrom
push-quotuxqwplul

Conversation

@insipx

@insipx insipx commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Note

Update Rust toolchain to 1.96.1 and fix nix wasm and cargo zigbuild builds

  • Bumps Rust channel in flake.nix from 1.95.0 to 1.96.1 and updates flake.lock accordingly.
  • Fixes nix/package/node.nix to pass an explicit --target flag to cargo zigbuild for glibc-suffixed targets.
  • Reworks nix/package/wasm.nix to let wasm-pack install artifacts into $out/dist directly, removing cargo binary post-install and JSON log capture.
  • Updates @napi-rs/cli from 3.5.1 to 3.7.2 and Playwright from 1.58 to 1.60 across JS packages.
  • Updates .envrc to load the #rust flake output and adds just to the Rust dev shell.

Macroscope summarized 551ccfe.

updating the .envrc to use the #rust shell since the android bindings build w/o android sdk in nix shell & nix ios shell is broken until #3759 . further should make loading dev shell faster

@insipx
insipx requested review from a team as code owners July 2, 2026 15:10
@insipx
insipx force-pushed the push-quotuxqwplul branch from 9292ed8 to f2cf2db Compare July 2, 2026 15:10
@claude

claude Bot commented Jul 2, 2026

Copy link
Copy Markdown

Claude finished @insipx's task —— View job


PR Review Complete

Review Date: 2026-07-02 17:20 UTC

Summary

This PR successfully updates Rust from 1.95.0 to 1.96.1 and makes necessary build configuration fixes. The two previously raised issues have been properly addressed by the author.

Verified Fixes

.envrc PATH issue: Confirmed that just was added to nix/shells/rust.nix:46 with explanatory comment
atf cross-compilation override removal: Verified that nixpkgs revision b5aa0fbd53... (shown in flake.lock:127) includes the upstream fix

Code Quality Assessment

Build Configuration Changes (nix/package/wasm.nix:92, nix/package/node.nix:60)

  • Correctly fixes wasm-pack JSON output conflict by removing --message-format and setting doNotPostBuildInstallCargoBinaries=true
  • Properly adds explicit --target ${CARGO_BUILD_TARGET} to zigbuild invocation with clear comment explaining why the glibc-suffixed target needs zigbuild's --target flag

Dependency Updates

  • @napi-rs/cli: 3.5.1 → 3.7.2 (nix/lib/packages/napi-rs-cli/default.nix:17)
  • Playwright: 1.58 → 1.60 (bindings/wasm + browser-sdk)
  • Updates appear routine and include corresponding hash updates in missing-hashes.json

Additional Improvements

  • Android shell now includes git to handle in-shell nix eval spawning (nix/shells/android.nix:51) with clear rationale in comment

No Issues Found

  • No security concerns
  • No performance regressions expected
  • Changes are well-documented with inline comments
  • All modifications follow existing patterns and conventions

The PR is well-executed with appropriate fixes for the raised concerns.


macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Jul 2, 2026
@macroscopeapp

macroscopeapp Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved

Toolchain version updates (Rust 1.95→1.96.1, playwright, napi-rs-cli) and nix flake refresh. All changes are build/development configuration with no runtime impact. Author owns all modified files.

You can customize Macroscope's approvability policy. Learn more.

Comment thread .envrc
@insipx
insipx force-pushed the push-quotuxqwplul branch from f2cf2db to dd3693f Compare July 2, 2026 15:16
@macroscopeapp
macroscopeapp Bot dismissed their stale review July 2, 2026 15:17

Dismissing prior approval to re-evaluate dd3693f

Comment thread nix/lib/patches.nix
@insipx
insipx force-pushed the push-quotuxqwplul branch 4 times, most recently from 62da8d4 to 09f2d47 Compare July 2, 2026 16:04
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.55%. Comparing base (ac662b3) to head (551ccfe).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3810      +/-   ##
==========================================
+ Coverage   84.49%   84.55%   +0.06%     
==========================================
  Files         410      410              
  Lines       61001    60905      -96     
==========================================
- Hits        51541    51497      -44     
+ Misses       9460     9408      -52     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@insipx
insipx force-pushed the push-quotuxqwplul branch 3 times, most recently from 2daebc5 to 79a4cb3 Compare July 2, 2026 16:55
Fix nixpkgs-update fallout:
- pass --target explicitly to cargo zigbuild (cargo-zigbuild 0.23 /
  cargo-options 0.8 dropped the CARGO_BUILD_TARGET env fallback, so the
  glibc-suffixed target leaked raw to rustc)
- bump vendored napi-rs-cli 3.5.1 -> 3.7.2 and regenerate yarn berry
  offline-cache hashes (nixpkgs yarn-berry 4.14 rejects v8 lockfiles;
  3.7.x ships a v10 lockfile)
- add git to the android dev shell: in-shell nix eval (fetchGit for git
  cargo deps) spawned system git, which loaded nix-store openssl/zlib
  from LD_LIBRARY_PATH and died on the glibc 2.42 ABI mismatch on CI
  runners
- wasm-pack 0.15 appends its own --message-format=json, so drop ours
  from the extra cargo args and stop capturing a cargo build log; skip
  the crane build-log install hooks since wasm-pack installs straight
  to $out/dist
- bump the npm playwright pin 1.58 -> 1.60 to match nixpkgs
  playwright-driver.browsers (the pins must match exactly for
  PLAYWRIGHT_BROWSERS_PATH to resolve)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@insipx
insipx force-pushed the push-quotuxqwplul branch from 79a4cb3 to 551ccfe Compare July 2, 2026 17:17
@insipx
insipx enabled auto-merge (squash) July 2, 2026 17:24
@insipx
insipx merged commit 004b48c into main Jul 2, 2026
46 checks passed
@insipx
insipx deleted the push-quotuxqwplul branch July 2, 2026 17:26
insipx added a commit that referenced this pull request Jul 6, 2026
## Summary

The 2026-07-03 nightly failed in `release-node-sdk / bindings /
build-macos (darwin-arm64)`:

```
atf-aarch64-apple-darwin> configure: error: cannot run test program while cross compiling
error: Cannot build '...libiconv-aarch64-apple-darwin-113.drv' — 1 dependency failed
error: Cannot build '...bindings-node-js-napi-aarch64-apple-darwin-1.11.0-dev.drv'
```

No node-sdk/node-bindings npm nightly has published since
`20260630.ac662b3` — and because the nightly watermark is the latest tag
of *any* SDK, the successful iOS leg's `20260703` tag makes every
subsequent scheduled run log "No new commits since last nightly;
skipping", so the node leg never retried.

## Why the upstream fix doesn't cover this

#3810 removed this overlay expecting NixOS/nixpkgs#510292 (merged,
present in the pinned nixos-unstable rev `b5aa0fbd`) to cover it. The
upstream seeds are gated on `!stdenv.buildPlatform.canExecute
stdenv.hostPlatform` — but this build's cross is **aarch64-darwin →
aarch64-apple-darwin**: same arch, same kernel, so `canExecute` is true
and the seeds never apply, while autoconf still decides
`cross_compiling=yes` from the configured-triple mismatch and aborts the
`AC_RUN_IFELSE` probes.

This restores the original overlay verbatim (structurally gated on
`buildPlatform != hostPlatform`) with the comment updated to record the
upstream state and the retirement condition: the upstream gate switching
to structural inequality (nixpkgs follow-up incoming). Double-applying
the seeds when both gates fire is harmless — same cache values.

Verification: `nix-instantiate --parse` clean; the real proof is the
next scheduled nightly (new commit un-skips the watermark) or a manual
`Release` dispatch with `node-sdk: true`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

<!-- Macroscope's pull request summary starts here -->
<!-- Macroscope will only edit the content between these invisible
markers, and the markers themselves will not be visible in the GitHub
rendered markdown. -->
<!-- If you delete either of the start / end markers from your PR's
description, Macroscope will append its summary at the bottom of the
description. -->
> [!NOTE]
> ### Restore atf cross-compilation overlay in nix patches
> Restores an overlay in
[patches.nix](https://github.com/xmtp/libxmtp/pull/3822/files#diff-a0c603b759efcc01ff44a1cc1d0f7aeb5b28903640bb2354bb0c6b41059a3609)
that was dropped in #3810. When `buildPlatform != hostPlatform`, the
`atf` derivation is overridden to pre-seed three autoconf cache
variables (`kyua_cv_getopt_plus`, `kyua_cv_attribute_noreturn`,
`kyua_cv_getcwd_works`) so `AC_RUN_IFELSE` tests are skipped and
configuration succeeds during cross-compilation.
>
> <!-- Macroscope's review summary starts here -->
>
> <sup><a href="https://app.macroscope.com">Macroscope</a> summarized
f4005df.</sup>
> <!-- Macroscope's review summary ends here -->
>
<!-- macroscope-ui-refresh -->
<!-- Macroscope's pull request summary ends here -->

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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