1

I was reading about no-std Rust when I came across the eh_personality language feature. I was reading about it and noticed it is a crucial part of the unwinding stack, as well as being "mapped to GCC's personality function". Is there any history between the naming of Rust's and, optionally, GCC's personality functions?

LeoDog896
  • 3,472
  • 1
  • 15
  • 40
  • 2
    No time to write an answer but see https://www.reddit.com/r/rust/comments/estvau/til_why_the_eh_personality_language_item_is/ – Thomas Dec 08 '22 at 13:51
  • That's neat! I don't even know how I missed that in my initial searches. I'll leave some more time for anyone else to write an answer since I can't properly access any comments on that post at this time. – LeoDog896 Dec 08 '22 at 17:21

1 Answers1

1

Adapted from this reddit post:

  • eh is not an exclamation but rather an abbreviation of "exception handling".
  • personality actually comes from its C++ counterpart, which is traditionally named personality because it determines what type of exception handling to use (thus giving it a choice in what it does and furthermore a "personality" of sorts)

In summary, it's the "exception handling personality", or how the program will respond to an exception.

LeoDog896
  • 3,472
  • 1
  • 15
  • 40