vulkano-rs / vulkano

Safe and rich Rust wrapper around the Vulkan API
Apache License 2.0
4.5k stars 433 forks source link

WSL2 support #2364

Open AlterionX opened 11 months ago

AlterionX commented 11 months ago

Issue

A request for a portion of the readme that details how to set up Vulkano in WSL2.

I have a working Vulkan setup (though I haven't run through an actual Vulkano application yet) w/ mesa (+ dozen), VcXsrv on the actual (hosting?) machine (Windows side), and probably weston on the WSL2 side. I was wondering if that's reasonable to add to the README or if it's excluded for some specific reason.

ryco117 commented 10 months ago

I use WSL2 for my Rust setup and for Vulkano what I do is add to my .cargo/config.toml the following:

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

This sets the default cargo build toolchain for the project to Windows 64-bit, which results in building a native Win64 .exe which can be run from either the WSL environment or copied back to Windows.