Open NickGerleman opened 10 months ago
Related: https://github.com/microsoft/react-native-windows/issues/2974 https://github.com/microsoft/react-native-windows/issues/7981
@NickGerleman Do you have a timeline for when you think it'll become a problem for RNW to not be building with RTTI? We'll want to measure the impact of including this again.
The Android switch to RTTI on in Meta apps is already being tested. There aren't current plans to add explicit RTTI usage (beyond existing JSI APIs), but it will likely come sometime after.
Heads up that the changes landed so that all of Meta's builds have RTTI enabled.
We haven't added more usage of it yet, but do explicitly want to replace e.g. traitCast
with dynamic_cast
.
Right now
react-native
mostly tries to avoid RTTI. RN libraries for Android inside of Meta are built with-fno-rtti
, but all other internal and OSS builds use-frtti
.Meta's Android build is now moving to globally use
-frtti
, and JSI was built with RTTI in mind. It is possible we will more broadly allow RTTI usage in RN in the future.React Native Windows right now disables RTTI in release builds.