From rust to llvm ir and BACK

Hi there,
I might take on a thesis topic that would require me to modify rustc and add apply extra LLVM passes to the code. So far, I haven't looked deep into neither,so before I take this on I would like to know:

Is it generally possible (plausible) to define (annotate or similar) some sort of handle in rust code that can be addressed from llvm ir code?

The point is to trigger some handler in case of an unrecoverable fault in the code produced by llvm.

Thank you

2 Likes