Skip to content

build: separate host and target Rust artifacts in cross builds - #66823

Draft
inoway46 wants to merge 2 commits into
nodejs:mainfrom
inoway46:build-rust-cross-targets
Draft

inoway46 wants to merge 2 commits into
nodejs:mainfrom
inoway46:build-rust-cross-targets

Conversation

@inoway46

@inoway46 inoway46 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Fix duplicate Rust archive rules in Temporal cross builds by capturing CARGO_BUILD_TARGET and the Rust host triple during configure, then separating Cargo targets and output paths.

This extends #66804 to Rust archives, which require separate host and target builds rather than a shared producer.

Validation: Make/Ninja × Release/Debug passed archive generation and Temporal FFI linking/execution with an rv64gc/lp64d-compatible sysroot, using QEMU for RISC-V.

Refs: #66803

Cross builds instantiate several shared generation actions in both
toolsets, producing duplicate output rules that Ninja rejects.

Register these actions once in the target toolset and explicitly share
them with host consumers. Keep generator executables in the host toolset
for cross builds.

Refs: nodejs#66803
Assisted-by: Codex
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
Capture the Rust target and host triples during configure for bundled
Temporal cross builds. Use explicit Cargo targets and separate output
directories so host and target archives do not share a build rule.

Refs: nodejs#66803
Assisted-by: Codex
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/build
  • @nodejs/gyp
  • @nodejs/inspector
  • @nodejs/security-wg
  • @nodejs/tsc
  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run. labels Oct 18, 2026
@inoway46

Copy link
Copy Markdown
Contributor Author

Opening this as a draft to make the overall fix plan for #66803 clear. It includes #66804; once that lands, I’ll rebase onto main to keep only the Rust changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib / src Issues and PRs involving general changes in the lib/ or src/ directories. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants