Hi all,
Wanted to check out Roc on Windows, though I know support is limited.
Built the compiler from source and it looks okay.
Now I'm trying to run the helloWorld.roc example but it seems the basic-cli package has no Windows support.
I'm completely new here and don't know if that is indeed the case? Couldn't find any clear info on this.
Compiler error:
I was expecting this file to exist:
C:\...\Roaming\Roc\packages\github.com/roc-lang/basic-cli/releases/download/0.10.0\vNe6s9hWzoTZtFmNkvEICPErI9ptji_ySjicO6CkucY\windows-x64.rh
However, it was not there!
The file indeed doesn't exist, I only see Linux and MacOS
This is correct. In my experience only the zig platforms seem to reliably work for now. I haven't really dug into what changes we need to make to the basic cli to get it working.
So for example checkout https://github.com/lukewilliamboswell/roc-wasm4 which works on Windows and is fun
Also note that the surgical linker has a bug and is currently the default for Windows so be sure to use --linker=legacy
when using examples like platform switching.
Oh, to specifically address your question. It's looking for the prebuilt binaries in the platform tar file. But we dont have prebuilt files for Windows yet. You can clone basic-cli and use a path if you want to use it locally. I have a branch of basic-cli that should be easier to build the platform prebuilt binary if you are interested in looking into this.
Alright, good to know.
At least I learned some things while getting the compiler working :smile:
Thanks for the tips!
what are blockers for including the windows version in those binaries (now that @Luke Boswell showed that we can cross-compile platforms)
There's a wondows surgical linker bug causing everything to segfault
I have this PR https://github.com/roc-lang/basic-cli/pull/194 that I should probably update and submit for review. That changes the building in preparation for the removal of rebuilding host from the cli. But if people are using a release there is no difference. It would make it so we can do the cross compiling thing. Then I guess its a matter of checking what is compatible with windows.
My main concern with that PR is just I haven't spoken to Anton yet, and we will need to modify the bundle process a little. I wanted to make sure Anton was happy with the final result, but I guess we could achieve that with a PR review. That PR was really helpful in developing the basic-ssg and platform-template repositories.
Oh, the other thing is I need to figure out how to do the cross-compile thing for surgical linker artefacts. I'm hoping :fingers_crossed: that with both cargo and roc cross compiling that should just work.
I can maybe look into this again tomorrow.
Last updated: Jul 26 2025 at 12:14 UTC