Daniel Verkamp 52b8e42869 Cargo.toml: avoid "*" versions for external crates | 5 months ago | |
---|---|---|
.. | ||
src | 24dfa67e5e Remove once_cell from a few more static Mutex inits | 8 months ago |
Cargo.toml | 52b8e42869 Cargo.toml: avoid "*" versions for external crates | 5 months ago |
README.md | f7095ff46a Upstream the perfetto crate. | 1 year ago |
build.rs | 97dff044f8 Replace #[cfg(unix)] with #[cfg(any(target_os = "android", target_os = "linux"))] | 1 year ago |
The following instructions are based on tools/impl/bindgen-common.sh
When the Perfetto C API is updated, in order to regenerate the bindings:
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
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)]
Finally, add a copyright header to the bindings.