mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-23 22:01:31 +11:00
2496098890
This update rewrites the winit's Wayland backend using new wayland-rs 0.30 API. This fixes long standing issue with the forward compatibility of the wayland backend, meaning that future updates to the wayland protocol won't break rust code anymore. like it was before when adding new shm/enum variants into the protocol. Fixes #2560. Fixes #2164. Fixes #2128. Fixes #1760. Fixes #725.
25 lines
872 B
Rust
25 lines
872 B
Rust
use cfg_aliases::cfg_aliases;
|
|
|
|
fn main() {
|
|
// The script doesn't depend on our code
|
|
println!("cargo:rerun-if-changed=build.rs");
|
|
|
|
// Setup cfg aliases
|
|
cfg_aliases! {
|
|
// Systems.
|
|
android_platform: { target_os = "android" },
|
|
wasm_platform: { target_family = "wasm" },
|
|
macos_platform: { target_os = "macos" },
|
|
ios_platform: { target_os = "ios" },
|
|
windows_platform: { target_os = "windows" },
|
|
apple: { any(target_os = "ios", target_os = "macos") },
|
|
free_unix: { all(unix, not(apple), not(android_platform)) },
|
|
redox: { target_os = "redox" },
|
|
|
|
// Native displays.
|
|
x11_platform: { all(feature = "x11", free_unix, not(wasm), not(redox)) },
|
|
wayland_platform: { all(feature = "wayland", free_unix, not(wasm), not(redox)) },
|
|
orbital_platform: { redox },
|
|
}
|
|
}
|