Skip to content

fix(pty): link Ghostty statically and add Windows CI - #8

Merged
jlongster merged 11 commits into
masterfrom
windows-ci
Sep 2, 2026
Merged

fix(pty): link Ghostty statically and add Windows CI#8
jlongster merged 11 commits into
masterfrom
windows-ci

Conversation

@jlongster

@jlongster jlongster commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Add Windows x64/ARM64 build-and-test CI and fix the native dependency linkage exposed by running it. No terminal transport implementation, packaging changes, or OpenCode integration.

Fix the Unicode crash

The published libghostty-vt-sys 0.2.1 validates ghostty-vt-static.lib but links ghostty-vt.lib, which is the Windows DLL import library. Windows debugger output confirmed the Unicode test was loading ghostty-vt.dll and crashing in simdutf::convert_utf8_to_utf32_with_errors while processing non-ASCII input.

Pin the matching Rust bindings to upstream commit bac73b914d936e945de4a6b93bed75ae1ce8895c, which fixes MSVC static linking. That revision requires Zig 0.16.0, so both CI workflows use that version. No vendored dependency, local linker override, or test skip is retained.

Windows CI

  • Run on PRs (including subsequent branch pushes), master pushes, and manual dispatch after the workflow reaches master; avoid duplicate push/PR runs for feature branches
  • Build for x64 and ARM64 and run the tests on matching Windows runners
  • Verify runner architecture and the test executable's PE machine type
  • Run all enabled tests, then copy just the library test executable out of the build tree and run it without Cargo's DLL search paths
  • Check the CLI executable's version, retain caches on failure, and provide serial failure diagnostics and timeouts
  • Enable Git long paths for nested dependency checkouts
  • No package or release publishing

ARM64 tooling is explicitly documented: native ARM64 Zig 0.16 crashes during the dependency build, so that job uses x64-hosted Rust/Zig compilers targeting ARM64 on the ARM64 runner. It also applies a guarded one-line @alignCast fix to Zig 0.16's Windows stack-trace helper, which otherwise fails to compile ARM64 function pointers. The resulting test executables are ARM64 and run natively, not through x64 emulation.

Verification

Green Windows run: https://github.com/anomalyco/opencode-pty/actions/runs/33663737280

  • Windows x64: build, all 14 enabled library tests, standalone library tests, and CLI smoke check pass
  • Windows ARM64: build, all 14 enabled library tests, standalone library tests, and CLI smoke check pass
  • Linux: cargo fmt --check, cargo clippy --all-targets --all-features -- -D warnings, all 32 tests in debug and release profiles pass
  • actionlint .github/workflows/windows.yml passes

The original Unicode test remains unchanged. The existing service, ownership, playground, and rows integration suites are still Unix-gated; this PR does not claim Windows named-pipe transport or ConPTY lifecycle support is implemented.

@jlongster
jlongster marked this pull request as ready for review September 2, 2026 16:54
@jlongster jlongster changed the title test(pty): add native Windows CI fix(pty): link Ghostty statically and add Windows CI Sep 2, 2026
@jlongster
jlongster merged commit 5548e41 into master Sep 2, 2026
2 checks passed
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