The crates that I have looked at work by installing their own minimal signal handler which then puts a message into a channel, or otherwise delivers the message that the signal was fired to your code in a safe way.
Of course, you are still trusting that the implementation is sound.
Of course, you are still trusting that the implementation is sound.