NativeScript / ios-jsc

NativeScript for iOS using JavaScriptCore
http://docs.nativescript.org/runtimes/ios
Apache License 2.0
298 stars 59 forks source link

[FR] Customize metadata generation to avoid adding unnecessary unused JS wrappers #1209

Closed mbektchiev closed 4 years ago

mbektchiev commented 4 years ago

Is your feature request related to a problem? Please describe. Currently, the whole iOS SDK and all native libraries used in a {N} app are included in the metadata binary files. In order to reduce app size and improve startup performance, we should allow app/plugin developers to specify which entities (e.g. clang modules) need to actually be accessible from JavaScript.

Additional context Things to consider:

An idea for UI which helps generate these lists from @shirakaba: Polyfill.io shows one user interface by which one could generate a package by specifying only the libraries that one needs. Maybe something like this could be applied to the NativeScript runtimes: https://polyfill.io/v3/url-builder/

Corresponding feature request in Android runtime is: https://github.com/NativeScript/android-runtime/issues/1485

Implemented in {N} CLI with: https://github.com/NativeScript/nativescript-cli/issues/5220