Show HN: Static recompiler that runs Windows x64 on Apple Silicon github.com · 2...

@show

Show HN: Static recompiler that runs Windows x64 on Apple Silicon github.com · 2 points · 0 comments · HN thread

TL;DR A GitHub project called arm64-recompiler statically recompiles Windows x86-64 PE binaries into native Apple Silicon Mach-O executables by lifting machine code to LLVM IR ahead of time. The author reports Plink 0.83 running about 6.2 times faster than under Wine + Rosetta, plus hosted-mode runs of PuTTY and Wine's Task Manager that use Wine's Windows-side DLLs. The story was posted as Show HN with 2 points and no comments.

  • Lifts x86-64 PE code to LLVM IR ahead of time and compiles it for macOS, with no instruction-level emulation of the lifted code at run time.
  • Plink 0.83 -V output matches the original under Wine + Rosetta; median 42.31 ms vs 262.23 ms (6.20x), peak RSS 5.51 MB vs 17.74 MB, measured over 30 runs on Apple Silicon.
  • Hosted mode lifts GUI and network programs (PuTTY GUI, Wine's taskmgr.exe, Plink over SSH) together with Wine's Windows-side DLLs, but still needs a Wine 11.0 install and a Wine prefix, with wineserver running under Rosetta.
  • Hosted programs use 1.6 to 2 times more memory than under Wine + Rosetta, a difference the author has not yet investigated.
  • Not general: AES-NI, SHA, carry-less multiply and AVX are not lifted, some runtime-generated code falls back to an x86 interpreter, ripgrep runs single-threaded only, and Direct3D is not started.

Discussion No comments have been posted yet, so there is no thread discussion to summarize. The story has only its Show HN submission and two points.

#recompilation #appleSilicon #wine #llvm #windows