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
The way the procmacro works is it appends a one-liner to the code in the body of the function. An extern function doesn't have a body, so we can't really inject new behavior into it. I suspect any solution for this would ultimately behind the scenes just wrap the call in a rust function.
I try to keep procmacros extremely straightforward and use them sparingly, and I think the cost/benefit ratio for this would be outside my comfort zone. (I'd keep an open mind if you wanted to give it a try though.)
I would like to be able to profile some
extern "C"functions.Currently, if I try to apply the
#[profiling::function]macro to one of these functions, I get an error:Is there any way to do this without wrapping every external function in a Rust function first?
The text was updated successfully, but these errors were encountered: