From setting core_affinity to measuring L1i cache misses with good ol' perf
or poking at hardware counters, if there's standard perf tooling you expect to work, it should work well in Rust too (but it might look a bit different than what you expect.)
The Rust community has a healthy suite of monitoring for hundreds of perf mentrics, see perf.rust-lang.org.
Let's look at some Rust specific flavors of what you should know.