rust_tracy_client
rust_tracy_client copied to clipboard
Define custom source location for spans
We have a bunch of code that's generated by another language, and a build script creates the rust bindings for every method defined in the other language. It'd be really nice to be able to generate a span_location!()
for each method, pointing to the true original source and line number, rather than it just assuming that file!()
/line!()
works.
The easiest would probably just be adding those as extra values to the macro, e.g. span_location!(name, function, file, loc)
, but anything that works at compile time works for us. It'd get generated and stored in a giant pub const FUNCTIONS = ....
.