Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add updated WSL2 Instructions #5040

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions docs/linux_dependencies.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,40 @@ Compiling with clang is also possible - replace the `g++` package with `clang`.

### Windows Subsystem for Linux (WSL 2)

Graphics and audio need to be configured for them to work with WSL 2 backend.
Please see the ubuntu [WSL documentation](https://wiki.ubuntu.com/WSL) on how to set up graphics and audio.
WSL2's virtual GPU Driver only supports OpenGL, requiring you to cross-compile for Windows within WSL and then run the build on Windows. (See [#841](https://github.com/bevyengine/bevy/issues/841) and [microsoft/WSL#7790](https://github.com/microsoft/WSL/issues/7790))

#### Dependencies

First install the MinGW toolchain

```bash
sudo apt-get install mingw-w64
```

Add the rust target

```bash
rustup target add x86_64-pc-windows-gnu
```

#### Usage

Place the following into `.cargo/config.toml` for your project

```toml
[build]
target = "x86_64-pc-windows-gnu"
```

Alternatively to changing your config, when building or running specify the target manually

```bash
cargo build --target x86_64-pc-windows-gnu
```

```bash
cargo run --target x86_64-pc-windows-gnu
```

## [Fedora](https://getfedora.org/)

Expand Down