Skip to content

fix: install Rust x86_64 target for darwin/amd64 cross-compilation#10

Merged
yneves merged 1 commit into
mainfrom
fix/darwin-amd64-temporal-rs
May 21, 2026
Merged

fix: install Rust x86_64 target for darwin/amd64 cross-compilation#10
yneves merged 1 commit into
mainfrom
fix/darwin-amd64-temporal-rs

Conversation

@yneves
Copy link
Copy Markdown
Collaborator

@yneves yneves commented May 21, 2026

Summary

  • The build-v8-deps workflow runs on macos-latest (arm64) for all darwin builds. When cross-compiling for darwin/amd64, V8's bundled Rust toolchain lacks the x86_64-apple-darwin target, so the temporal_rs Rust crate is silently skipped during v8_monolith compilation.
  • This leaves 307 undefined _temporal_rs_* FFI symbols in libv8-1.a, causing linker failures (ld: symbol(s) not found for architecture x86_64) in downstream consumers — specifically er's release workflow (Build (darwin/amd64)).
  • Fix: install system Rust via rustup with the x86_64-apple-darwin target, then set rust_sysroot_absolute in GN args so V8's build uses it instead of the bundled toolchain.

After merge

  1. Trigger the build-v8-deps workflow (workflow_dispatch) to rebuild darwin/amd64 deps
  2. The rebuilt libv8-{0,1,2}.a will include temporal_rs symbols
  3. Tag a new release (v0.34.0-chess.7) with the fixed binaries
  4. Update er's go.mod replace directives to point to the new deps

Test plan

  • build-v8-deps workflow succeeds for darwin/amd64
  • nm deps/darwin_amd64/libv8-1.a | grep ' U _temporal_rs_' | wc -l returns 0
  • er release workflow Build (darwin/amd64) passes with the new deps

The build-v8-deps workflow runs on macos-latest (arm64) for all darwin
builds. When cross-compiling for darwin/amd64 (x86_64), V8's bundled
Rust toolchain lacks the x86_64-apple-darwin target, so the temporal_rs
Rust crate is silently skipped. This leaves 307 undefined _temporal_rs_*
symbols in libv8-1.a, causing link failures in downstream consumers
(e.g. er's release workflow).

Fix: install system Rust with the x86_64-apple-darwin target and point
V8's GN build at it via rust_sysroot_absolute. This ensures temporal_rs
compiles for x86_64 during cross-compilation.
@yneves yneves merged commit 244d3a4 into main May 21, 2026
2 checks passed
@yneves yneves deleted the fix/darwin-amd64-temporal-rs branch May 21, 2026 13:32
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