Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
src/ | H | 25-Apr-2025 | - | 1,052 | 802 | |
Cargo.toml | H A D | 25-Apr-2025 | 763 | 29 | 24 | |
README.md | H A D | 25-Apr-2025 | 875 | 22 | 18 | |
build.rs | H A D | 25-Apr-2025 | 2.1 KiB | 63 | 22 |
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