Name Date Size #Lines LOC

..--

src/H25-Apr-2025-1,052802

Cargo.tomlH A D25-Apr-2025763 2924

README.mdH A D25-Apr-2025875 2218

build.rsH A D25-Apr-20252.1 KiB6322

README.md

1# Perfetto Rust wrapper
2
3The following instructions are based on `tools/impl/bindgen-common.sh`
4
5When the Perfetto C API is updated, in order to regenerate the bindings:
6
71. [Download the bindgen cmdline tool.](https://rust-lang.github.io/rust-bindgen/command-line-usage.html)
81. Run the bindgen command. If you are in crosvm:
9   ```
10   $ 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
11   ```
121. Add the following to the top of the new bindings.rs file:
13   ```
14   #![allow(clippy::missing_safety_doc)]
15   #![allow(clippy::upper_case_acronyms)]
16   #![allow(non_upper_case_globals)]
17   #![allow(non_camel_case_types)]
18   #![allow(non_snake_case)]
19   #![allow(dead_code)]
20   ```
211. Finally, add a copyright header to the bindings.
22