You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the fly compiling and statically linking the C bindings is exactly what I need to bind Perfetto to Rust. That'll be much more convenient than pre-compiling and bundling libperfetto_c.so for various targets/architectures.
As a temporary workaround, would it be possible to compile perfetto_c statically, so that I don't have to move around and ship .so/.dlls?
Going forward, I see a few things in the C bindings that still need to change to make them fully usable for this use-case (Rust, without #includeing the the headers in a C project). Some of these points should likely be split out into separate issues:
Improved documentation and samples for the raw C bindings. My Rust bindings are based on dissecting the implementations of various macros and static inline functions used in examples/shared_lib/ files;
Said static inline functions need to become exported functions, otherwise they need to be reimplemented in Rust based on (hopefully!) exported functions that are called inside;
One example is PerfettoTeCounterTrackRegister(), which I think is required to make counters work, i.e. they cannot be reported on the current process/thread track?;
Other examples are various static inline functions that end up calling lower-level *Impl() functions;
Will this become a second, separate amalgamated source file? The current perfetto.cc file takes very long to compile, and probably includes far too many sources that won't be needed for the C bindings;
Good documentation of when (pointers to) data outlive a function call. This seems to be the case specifically when registering categories but (obviously) not when emitting trace markers.
Similar to how we provide an amalgamated source for the C++ library, we should provide an amalgamated source for the C shared library.
The text was updated successfully, but these errors were encountered: