Cargo Features

[dependencies]
egui-wgpu = { version = "0.29.1", default-features = false, features = ["puffin", "winit", "wayland", "x11", "fragile-send-sync-non-atomic-wasm"] }
default = fragile-send-sync-non-atomic-wasm

The fragile-send-sync-non-atomic-wasm feature is set by default whenever egui-wgpu is added without default-features = false somewhere in the dependency tree.

puffin

Enable profiling with the puffin crate.

Enables puffin

winit

Enable winit integration. On Linux, requires either wayland or x11

Enables winit

Optional dependencies:

Affects egui-wgpu::winit

wayland

Enables Wayland support for winit.

Enables wayland of optional winit

x11

Enables x11 support for winit.

Enables x11 of optional winit

fragile-send-sync-non-atomic-wasm default

Make the renderer Sync on wasm, exploiting that by default wasm isn't multithreaded. It may make code easier, expecially when targeting both native and web. On native most wgpu objects are send and sync, on the web they are not (by nature of the WebGPU specification). This is not supported in multithreaded WASM. Thus that usage is guarded against with compiler errors in wgpu.

Enables fragile-send-sync-non-atomic-wasm of wgpu ^22.1.0