The thing other people are trying to express is: it’s possible to instrument code and generate code at compile time in Rust, via its macro system. In particular, many of the things that use reflection in C♯ and other languages not only can be done but are done in Rust—via procedural macros! Are you familiar with all the kinds of things that Rust’s macros can do? If so, can you give a specific example of a thing you would like to be able to do but find that you cannot? Because “code generation” and “instrumentation” are already things you can do in Rust—just in a different way than you would in other languages. People here understand the broad strokes; it’s the details that matter.
12 Likes