wayland-server 0.21.13

Bindings to the standard C implementation of the wayland protocol, server side.
Documentation
extern crate wayland_scanner;

use std::env::var;
use std::path::Path;
use wayland_scanner::*;

fn main() {
    let protocol_file = "./wayland.xml";

    let out_dir_str = var("OUT_DIR").unwrap();
    let out_dir = Path::new(&out_dir_str);

    if var("CARGO_FEATURE_NATIVE_LIB").ok().is_some() {
        // Generate the C code
        generate_c_code(protocol_file, out_dir.join("wayland_c_api.rs"), Side::Server);
        generate_c_interfaces(protocol_file, out_dir.join("wayland_c_interfaces.rs"));
    } else {
        generate_rust_code(protocol_file, out_dir.join("wayland_rust_api.rs"), Side::Server);
    }
}