tree: 7878e64c4f5fe1a216bd15613aa2073514c1951a [path history] [tgz]
  1. src/
  2. build.rs
  3. Cargo.toml
  4. README.md
perfetto/README.md

Perfetto Rust wrapper

The following instructions are based on tools/impl/bindgen-common.sh

When the Perfetto C API is updated, in order to regenerate the bindings:

  1. Download the bindgen cmdline tool.
  2. Run the bindgen command. If you are in crosvm:
    $ bindgen third_party/perfetto/include/perfetto/tracing/ctrace.h --disable-header-comment --no-layout-tests --no-doc-comments --with-derive-default --size_t-is-usize -o ./perfetto/src/bindings.rs
    
  3. Add the following to the top of the new bindings.rs file:
    #![allow(clippy::missing_safety_doc)]
    #![allow(clippy::upper_case_acronyms)]
    #![allow(non_upper_case_globals)]
    #![allow(non_camel_case_types)]
    #![allow(non_snake_case)]
    #![allow(dead_code)]
    
  4. Finally, add a copyright header to the bindings.