Hi experts! I have installed and compiled Roc successfully on (native) Windows 11. roc repl and roc edit work. When trying to compile any Roc program, I get the following message:
I was expecting this file to exist:
C:\Users\ivoba\AppData\Roaming\Roc\packages\github.com/roc-lang/basic-cli/releases/download/0.3.2\tE4xS_zLdmmxmHwHih9kHWQ7fsXtJr7W7h3425-eZFk\windows-x86_64.rh
However, it was not there!
Note: If the platform does have an .rh1 file but no .rh file, it's because it's been built with an older version of roc. Contact the author to release a new build of the platform using a roc release newer than March 21 2023.
If you have the platform's source code locally, you may be able to generate it by re-running this command omitting --prebuilt-platform
Is there a way to get or build the missing windows-x86_64.rh?
Hi Ivo,
You can build the platform from source locally:
packages
header in your roc file with packages { pf: "cli-0-3-2-path/src/main.roc" }
Heads up, I believe dbg
and testing don't work on windows yet and you may encounter some segmentation faults.
Thanks Anton! Sorry to bother you again, I believe Roc finds the local package now. But now I get this error:
roc helloWorldW.roc
🔨 Rebuilding platform...
warning: ignoring debug info with an invalid version (0) in app
An internal compiler expectation was broken.
This is definitely a compiler bug.
Please file an issue here: https://github.com/roc-lang/roc/issues/new/choose
thread '<unnamed>' panicked at 'Error:
Failed to rebuild src/main.rs:
The executed command was:
rustup run nightly-2022-10-30 cargo build --bin host
stderr of that command:
error: toolchain 'nightly-2022-10-30-x86_64-pc-windows-msvc' is not installed
', crates\compiler\build\src\link.rs:1483:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at 'Failed to (re)build platform.: Any { .. }', crates\compiler\build\src\program.rs:972:46
Do I really have to install such an old Rust toolchain version? These are the ones installed on my machine:
installed toolchains
stable-x86_64-pc-windows-msvc (default)
1.66.1-x86_64-pc-windows-msvc
active toolchain
stable-x86_64-pc-windows-msvc (default)
rustc 1.69.0 (84c898d65 2023-04-16)
Can I switch the compilation to stable-x86_64-pc-windows-msvc?
No, unfortunately you'll need that exact version
Thanks Anton, that worked, but I immediately get an error:
roc helloWorldW.roc
:hammer: Rebuilding platform...
warning: ignoring debug info with an invalid version (0) in app
An internal compiler expectation was broken.
This is definitely a compiler bug.
Please file an issue here: https://github.com/roc-lang/roc/issues/new/choose
thread 'main' panicked at 'running expect
s does not currently work on windows', crates\cli\src\lib.rs:1237:17
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
Indeed probably still too early to stark working on Windows :smile: , but things have advanced a lot since last year.
roc helloWorldW.roc
will basically use roc dev helloWorldW.roc
which is the "mode" that runs the expect
tests, using roc run helloWorldW.roc
instead could work
It does. Awesome!
Ivo Balbaert has marked this topic as resolved.
Last updated: Jul 06 2025 at 12:14 UTC