Compiling Motoko on Windows Without WSL – Is It Possible?

I want to know if it’s possible to compile Motoko code on Windows using the moc compiler without relying on WSL.

Currently, most guides recommend using WSL or a Unix-like environment, but I’m looking for a way to run the moc compiler natively on Windows. Are there any standalone binaries, workarounds, or alternative methods that allow Motoko development directly on Windows?

Any insights or suggestions would be greatly appreciated!

1 Like

I don’t think it’s possible. If you don’t want to install anything and continue to use windows, maybe try cloud environments like Gitpod or GitHub Codespaces. Probably the easiest way to get started if you’re using Windows.

Are there issues you are having with WSL?

We don’t provide Windows binaries for Motoko. It might be possible, but we just haven’t had the resources to try it. Our entire build and test system uses nix so we wouldn’t be able to build and test on windows, but might be able to cross-compile windows binaries from Linux.

Another option is to use our dev container. Needs docker, but with that you should have no issues on Windows

2 Likes

Is it possible for others to create Windows binaries for Motoko? Alternatively, could this be done using Node.js? Do you have any insights on how I can compile Motoko code natively on Windows?

No, I don’t have any issues with WSL, but I want to test running Motoko natively on Windows. Could you guide me on how to do it?

I understand that Windows binaries aren’t officially supported, but is there any way for others to generate them? Would it be possible using Node.js or another method? If not, do you have any alternative suggestions for compiling Motoko code directly on Windows?"

thanks! this is great solutions.

1 Like

We have .js downloads in the release page. Maybe you can run them under node (or such). No promises!

1 Like

ok thank you, i’ll try.