react-native-community/discussions-and-proposals

Merge dynamic link library

lucky-chen opened this issue · 6 comments

Introduction

Merge dynamic link library

Details

ReacNative has a lot of dylib. complex dependencies between each other

new_graph

It's difficult to understand and maintain

Discussion points

Can we merge the dylib? eg:

  • libReactNatvie.so
  • libReactNatvieDevtool.so

benefit

  • easy to maintain
  • reduce package size

There’s a lot of appetite to reduce the number of shared libraries, and @cortinico has started doing this on the Android side.

Yup we're planning on merging .so on Android in the near future

@cortinico Glad to get this information, great job!!!
And guys,did we have any roadmap or deadline,

Also, did we have plan on iOS。

@cortinico Glad to get this information, great job!!! And guys,did we have any roadmap or deadline,

Nope we don't have a roadmap for this work, but I hope to be able to do it in H1. For what is worth, 0.74 will already ship with a reduction in number of .so (from ~60 to ~40).

@lucky-chen no, we currently don't have plans for iOS.
The situation here is a bit more complex as we would have to unify the C++ layer in a way that preserve the include paths. As mush as I'd love to reach a moment where we only have React Native, Hermes/JSC, JSI and perhaps Yoga as frameworks, the amount of work is quite big.