wavefnd / wavefnd/Wave

Generate and link native Windows MSVC programs for amd64 and ARM64

Open
#498 0 comments 0 reactions 0 assignees View on GitHub
cross-platform enhancement help wanted os support
Dominant language
Rust
Stars
53
Forks
16
Avg merge
4h 22m
Merged PRs (30d)
46

Description

Native Windows ARM64 builds use Rust's MSVC toolchain, but Wave only registers Windows GNU output targets. `host_target_triple()` in `src/cli.rs` always selects `pc-windows-gnu` on Windows; CI explicitly expects that result. Building the compiler with MSVC therefore does not yet provide MSVC-generated Wave executables.

Add `x86_64-pc-windows-msvc` and `aarch64-pc-windows-msvc` target handling, MSVC-compatible object/C ABI verification against clang-cl, and a COFF linker path using link.exe/lld-link with correctly selected Windows SDK/UCRT/VCRuntime libraries. Validate machine type for every library and input. Cover executable startup, DLL exports/imports, aggregate returns, stack arguments, variadic calls, and large stack frames. Missing SDK tools must produce actionable diagnostics.

Rollout: explicit MSVC output first, native executable CI on both architectures next, then change native defaults only after coverage passes. Retain current Windows GNU targets, their linker behavior and CI throughout this work; removing GNU is not authorized in this patch.

Parent/native compiler host builds: #292. Existing native ARM64 execution crash: #493; missing HOME: #492. These are dependencies, not duplicates of this output-target task.

Microsoft ARM64 ABI: https://learn.microsoft.com/en-us/cpp/build/arm64-windows-abi-conventions

Contributor guide

Open the contributing guide

Research direction

Start in src/cli.rs at host_target_triple() and trace the existing Windows GNU target and linker paths, then inspect the Windows CI expectations. Use the stated ABI and toolchain requirements to map coverage for both architectures. Done means explicit MSVC outputs work with validated COFF inputs, startup and ABI cases pass, missing SDK tools give actionable diagnostics, and existing GNU targets and CI remain intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system, compilers, operating-systems, testing
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.