Consider adding some WSL-specific help to README
- Dominant language
- Rust
- Stars
- 1.2k
- Forks
- 230
- Avg merge
- 11m
- Merged PRs (30d)
- 1
Description
First of all thank you! Very excited to start using this.
There is a small gotcha I ran into because I use WSL environment. It will not run natively in it, you will need to cross-compile. It may be helpful to others?
## Testing Locally with WSL
### things to include in .cargo/config
```
[target.x86_64-pc-windows-gnu]
linker = "x86_64-w64-mingw32-gcc"
ar = "x86_64-w64-mingw32-gcc-ar"
```
This can work if you've got mingw `sudo apt install mingw-w64` (there maybe better linkers but i didn't investigate)
credit goes to these people: [link](https://www.reddit.com/r/rust/comments/5k8uab/crosscompiling_from_ubuntu_to_windows_with_rustup/)
you may also need to add this target with rustup and the compiler will tell you if you don't have it
```
rustup target add x86_64-pc-windows-gnu
```
to see which targets you have run
```
rustup target list
```
Then compile to that target: `cargo build --target x86_64-pc-windows-gnu`
Have your Rust directories somewhere easily accessible on both, WSL bash and on Windows file explorer: it will make you a clickable .exe file that works natively
The error you get if you let it think it's in real linux is here:
` Error: WinitEventLoop(Os(OsError { line: 81, file: "/home/xxxx/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.29.9/src/platform_impl/linux/wayland/event_loop/mod.rs", error: WaylandError(Connection(NoWaylandLib)) }))`
I tested that a GUI is possible (there are some nuances depending if you have WSL1 or WSL2 [link](https://learn.microsoft.com/en-us/windows/wsl/tutorials/gui-apps)) and in my configuration a linux GUI can be successfully displayed from WSL.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.