Skip to content

Add first-class Windows support#8

Merged
chaploud merged 5 commits intoclojurewasm:mainfrom
DeanoC:codex/windows-first-class-support-upstream
Mar 15, 2026
Merged

Add first-class Windows support#8
chaploud merged 5 commits intoclojurewasm:mainfrom
DeanoC:codex/windows-first-class-support-upstream

Conversation

@DeanoC
Copy link
Contributor

@DeanoC DeanoC commented Mar 13, 2026

Summary

  • add Windows runtime support across executable memory, guard pages, JIT, cache paths, and WASI host integration
  • make the spec, e2e, and real-world test runners cross-platform and add Windows CI coverage, release packaging, and PowerShell install support
  • support guest path aliases for preopened directories so Windows real-world WASI compat tests use stable guest-visible mount points

Testing

  • fork CI passed on Linux, macOS, and Windows in Add first-class Windows support DeanoC/zwasm#1
  • local Windows verification for the final compat fix: rust_file_io under zwasm.exe and wasmtime.exe with --dir HOST::/sandbox both returned 0 with matching output

Notes

DeanoC and others added 5 commits March 13, 2026 14:29
… docs

- run_compat.py: use --dir /tmp on Mac/Linux (guest path alias only on
  Windows) — fixes rust_file_io FAIL regression
- wasi.zig path_filestat_get: restore fstatat + SYMLINK_NOFOLLOW on
  POSIX; add writeFilestatPosix preserving nlink/mode from Stat
- wasi.zig fd_close: add comment explaining stdio SUCCESS (wasmtime compat)
- wasi.zig writeFilestat: document nlink=1 limitation
- README.md: fix duplicate Stage 33 (fuzz=33, windows=34), remove
  "Windows port" from Future
- run_spec.py: detect .exe on Windows for ZWASM path
- guard.zig: replace magic -1 with named EXCEPTION_CONTINUE_EXECUTION
- wasi.zig: simplify HostHandle.close() — remove unnecessary mutable
  copy for File (File.close takes self by value, Dir needs *Dir)
- wasi.zig: document fd_renumber placeholder entries as never-accessed
- wasi.zig: add doc comment on allocFd ordering constraint
- embedding.md: add .dll/.lib to lib output, cross-platform ctypes
- security.md: add Windows x86_64 to spec test platform list
- roadmap.md: mark Phase 15 (Windows) done, add v1.6.0 milestone
- decisions.md: add D129 (Windows first-class support architecture)
- memo.md: update current state and task for PR clojurewasm#8 review
- record.sh/run_bench.sh: replace declare -A (bash 4+) with
  file-based storage and string matching for bash 3 compat
- Record 58 benchmarks (29 uncached + 29 cached) for PR clojurewasm#8
@chaploud
Copy link
Contributor

Thanks again @DeanoC — another great contribution! Windows (x86_64) first-class support is a big milestone for zwasm.

I reviewed the full diff (26 files), ran the merge gate on macOS + Ubuntu locally, and pushed a few follow-up commits on top:

  • Fixes: restored SYMLINK_NOFOLLOW in path_filestat_get, fixed run_compat.py rust_file_io regression on Mac/Linux, .exe detection in run_spec.py
  • Cleanup: named VEH constant, simplified HostHandle.close(), documented allocFd ordering
  • Docs: added D129 decision record, updated embedding/security/roadmap/memo
  • Infra: fixed bench/record.sh bash 3 compat, recorded benchmarks (no regression)

CI is all green across macOS, Ubuntu, and Windows. Merging!

@chaploud chaploud merged commit 4f8963a into clojurewasm:main Mar 15, 2026
5 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.

2 participants