Skip to content

feat: build Windows bytecode binaries on Linux via Wine#285

Open
munelear wants to merge 1 commit into
yao-pkg:mainfrom
munelear:win-docker-wine
Open

feat: build Windows bytecode binaries on Linux via Wine#285
munelear wants to merge 1 commit into
yao-pkg:mainfrom
munelear:win-docker-wine

Conversation

@munelear

Copy link
Copy Markdown

Standard-mode win-x64 builds on a Linux host fabricate V8 bytecode with the host (Linux) Node, which the target's Windows V8 rejects at runtime, so the binary fails to start. Run the Windows target Node under Wine (an OS-ABI layer, same CPU arch -- no emulation) as the bytecode fabricator, analogous to the existing QEMU cross-arch path.

  • Add opt-in --cross-bytecode / pkg.crossBytecode (default off): selects the Windows base binary as the fabricator for a same-arch win target on a linux/alpine host.
  • Add file-based fabricator IPC for cross-OS fabricators; Wine cannot expose inherited Unix pipes as Windows stdio. The persistent stdin/stdout pipe path is unchanged for native builds.
  • Forward Wine env vars to the fabricator so no binfmt wrapper is needed.
  • Improve the bytecode-failure message to point at Wine/binfmt setup.
  • Docs (targets/bytecode/recipes/architecture) + unit tests for fabricator selection, the file-IPC round-trip, and flag parsing.

Standard-mode win-x64 builds on a Linux host fabricate V8 bytecode with
the host (Linux) Node, which the target's Windows V8 rejects at runtime,
so the binary fails to start. Run the Windows target Node under Wine
(an OS-ABI layer, same CPU arch -- no emulation) as the bytecode
fabricator, analogous to the existing QEMU cross-arch path.

- Add opt-in --cross-bytecode / pkg.crossBytecode (default off): selects
  the Windows base binary as the fabricator for a same-arch win target on
  a linux/alpine host.
- Add file-based fabricator IPC for cross-OS fabricators; Wine cannot
  expose inherited Unix pipes as Windows stdio. The persistent
  stdin/stdout pipe path is unchanged for native builds.
- Forward Wine env vars to the fabricator so no binfmt wrapper is needed.
- Improve the bytecode-failure message to point at Wine/binfmt setup.
- Docs (targets/bytecode/recipes/architecture) + unit tests for
  fabricator selection, the file-IPC round-trip, and flag parsing.
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