tree: b79c510bb0e6ded9fd2e13b44dfe7a19bf5c1ddc [path history] [tgz]
  1. src/
  2. tests/
  3. BUILD.gn
  4. README.md
src/lib/ui/wayland/bindings/scanner/README.md

wayland_scanner

Generate a rust module from a wayland protocol.xml file.

Usage

In a BUILD.gn file:

import("//build/rust/rustc_library.gni")
import("//src/lib/ui/wayland/bindings/protocol.gni")

wayland_protocol("my_protocol") {
  protocol = "my_protocol.xml"
}

rustc_library("lib") {
  deps = [
    ":my_protocol",
  ]
}

This will generate a rust library from my_protocol.xml and make it available to your library. For example usages, look at tests/back_end_test.rs.