Expo package with android/ios native code

How to build an expo package with android/ios native code like the react-native-appearance? Is there any specific tool for this like “Expo Module Scripts” or something like that?

I know the default answer for expo and native code is “you have to eject”, but considering that you guys create expo packages with native code, I wonder how? Which tools/scripts you guys use?

PS: Feel free to move this topic to a different place if necessary.