Update wayland-rs to 0.30.0
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.
This commit is contained in:
parent
60e91b187a
commit
2496098890
34 changed files with 3515 additions and 3458 deletions
40
build.rs
40
build.rs
|
|
@ -1,35 +1,8 @@
|
|||
use cfg_aliases::cfg_aliases;
|
||||
|
||||
#[cfg(all(
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "openbsd",
|
||||
target_os = "netbsd",
|
||||
),
|
||||
feature = "wayland",
|
||||
))]
|
||||
mod wayland {
|
||||
use std::env;
|
||||
use std::path::PathBuf;
|
||||
use wayland_scanner::Side;
|
||||
|
||||
pub fn main() {
|
||||
let mut path = PathBuf::from(env::var("OUT_DIR").unwrap());
|
||||
path.push("fractional_scale_v1.rs");
|
||||
wayland_scanner::generate_code(
|
||||
"wayland_protocols/fractional-scale-v1.xml",
|
||||
&path,
|
||||
Side::Client,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
// The script doesn't depend on our code
|
||||
println!("cargo:rerun-if-changed=build.rs");
|
||||
println!("cargo:rerun-if-changed=wayland_protocols");
|
||||
|
||||
// Setup cfg aliases
|
||||
cfg_aliases! {
|
||||
|
|
@ -48,17 +21,4 @@ fn main() {
|
|||
wayland_platform: { all(feature = "wayland", free_unix, not(wasm), not(redox)) },
|
||||
orbital_platform: { redox },
|
||||
}
|
||||
|
||||
// XXX aliases are not available for the build script itself.
|
||||
#[cfg(all(
|
||||
any(
|
||||
target_os = "linux",
|
||||
target_os = "dragonfly",
|
||||
target_os = "freebsd",
|
||||
target_os = "openbsd",
|
||||
target_os = "netbsd",
|
||||
),
|
||||
feature = "wayland",
|
||||
))]
|
||||
wayland::main();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue