tree: 9ca13ecb674d46d97ae0b68500d19cb50f51803f [path history] [tgz]
  1. src/
  2. tests/
  3. BUILD.gn
  4. README.md
garnet/bin/wayland/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("//garnet/bin/wayland/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.