If you're on Windows and you want to build on Midnight, the first thing you need to know is that Midnight's toolchain — the Compact compiler, proof server, and the rest — are Linux binaries. They won't run natively on Windows. Full stop.
That doesn't mean you're locked out. Windows has a feature called WSL2 — Windows Subsystem for Linux — that gives you a real Linux environment running inside Windows. Once it's set up you get a proper Ubuntu terminal, access to all the Linux dev tools you need, and a stable foundation for Midnight development.
I set up my entire Midnight development environment on WSL2. This guide documents exactly what I did — including the parts that aren't obvious and the parts that caught me off guard.
Step 1: Enable WSL2
Microsoft has official documentation for enabling WSL2.…