Skip to content

Commit

Permalink
Add note for Windows users in editor-support.md (#42)
Browse files Browse the repository at this point in the history
* Add note for Windows users in editor-support.md

* Include specific error example, fix formatting

* Remove extra newline and format as a quote

---------

Co-authored-by: Delan Azabani <dazabani@igalia.com>
  • Loading branch information
msub2 and delan authored Dec 11, 2024
1 parent 4fcfe2c commit 379e22a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/hacking/editor-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ To enable [optional build settings](building-servo.md#optional-build-settings),
}
```

### Windows users

If you are on Windows, you will need to use `./mach.bat` instead of just `./mach`.
Not doing so will cause rust-analyzer to throw an error, such as below:

<pre><blockquote><samp>Failed to run the following command: "./mach" "cargo-clippy" "--message-format=json" error=%1 is not a valid Win32 application. (os error 193)</samp></blockquote></pre>

This is due to the fact that `./mach` utilizes the shebang statement `#!/usr/bin/python3` to run as a Python script, which Windows does not support.

### NixOS users

If you are on NixOS and using `--use-crown`, you should also set CARGO_BUILD_RUSTC in `.vscode/settings.json` as follows, where `/nix/store/.../crown` is the output of `nix-shell --run 'command -v crown'`.
Expand Down

0 comments on commit 379e22a

Please sign in to comment.