mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2024-11-28 09:33:01 +00:00
f7095ff46a
This is a step towards upstreaming Perfetto support (adding the Perfetto Rust wrappers). These wrappers won't compile until we have the Perfetto source & libraries in place. BUG=b:277138899 TEST=n/a Change-Id: Ic9cc86285383b114cecf7cfe574b3e2511d7afeb Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4428221 Reviewed-by: Steven Moreland <smoreland@google.com> Reviewed-by: Morg <morg@chromium.org> Reviewed-by: Dennis Kempin <denniskempin@google.com> Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org> Commit-Queue: Noah Gold <nkgold@google.com>
875 B
875 B
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:
- Download the bindgen cmdline tool.
- 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.