678: Make libx11 optional r=kvark a=parasyte

**Connections**

Fixes #676 

**Description**

Make `libx11` optional with a new non-default feature. Default features need to go "to the edge". In its current state, a crate depending on `wgpu` cannot disable the `x11` feature on `gfx-backend-vulkan`.

- `wgpu` will be updated with a similar new feature, but will enable the `wgc/x11` feature by default. This should hopefully be backward compatible for any downstream user of `wgpu`.
- `wgpu-native` will also be given the same treatment.

**Testing**

This was tested with repro steps included in the linked ticket.


Co-authored-by: Jay Oster <jay@kodewerx.org>
This commit is contained in:
bors[bot]
2020-05-29 19:43:49 +00:00
committed by GitHub

View File

@@ -18,7 +18,6 @@ license = "MPL-2.0"
default = []
trace = ["ron", "serde", "wgt/trace"]
replay = ["serde", "wgt/replay"]
metal-auto-capture = ["gfx-backend-metal/auto-capture"]
#NOTE: glutin feature is not stable, use at your own risk
#glutin = ["gfx-backend-gl/glutin"]
@@ -56,7 +55,7 @@ gfx-backend-metal = { version = "0.5" }
gfx-backend-vulkan = { version = "0.5", optional = true }
[target.'cfg(all(unix, not(target_os = "ios"), not(target_os = "macos")))'.dependencies]
gfx-backend-vulkan = { version = "0.5", features = ["x11"] }
gfx-backend-vulkan = { version = "0.5" }
[target.'cfg(windows)'.dependencies]
gfx-backend-dx12 = { version = "0.5" }