{"id":28391487,"url":"https://github.com/react-native-community/javascriptcore","last_synced_at":"2025-06-25T21:31:21.705Z","repository":{"id":276232199,"uuid":"928272145","full_name":"react-native-community/javascriptcore","owner":"react-native-community","description":"JavaScriptCore for React Native ","archived":false,"fork":false,"pushed_at":"2025-05-07T15:40:59.000Z","size":407,"stargazers_count":48,"open_issues_count":2,"forks_count":5,"subscribers_count":10,"default_branch":"main","last_synced_at":"2025-06-21T21:55:36.240Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/react-native-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-02-06T11:06:07.000Z","updated_at":"2025-06-18T12:49:42.000Z","dependencies_parsed_at":"2025-03-04T09:27:38.409Z","dependency_job_id":"fc224a35-5ebe-4a76-baaa-f230f333634e","html_url":"https://github.com/react-native-community/javascriptcore","commit_stats":null,"previous_names":["react-native-community/javascriptcore"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/react-native-community/javascriptcore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-community%2Fjavascriptcore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-community%2Fjavascriptcore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-community%2Fjavascriptcore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-community%2Fjavascriptcore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-native-community","download_url":"https://codeload.github.com/react-native-community/javascriptcore/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-native-community%2Fjavascriptcore/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261200309,"owners_count":23123940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-05-31T09:39:16.518Z","updated_at":"2025-06-25T21:31:21.700Z","avatar_url":"https://github.com/react-native-community.png","language":"C++","readme":"# React Native JavaScriptCore\n\nOpt-in to use JavaScriptCore runtime in React Native.\n\n_Note: JavaScriptCore has been extracted from core react-native as a part of [Lean Core JSC RFC](https://github.com/react-native-community/discussions-and-proposals/blob/main/proposals/0836-lean-core-jsc.md)([PR](https://github.com/react-native-community/discussions-and-proposals/pull/836))._\n\n## Installation\n\n\u003e [!IMPORTANT]  \n\u003e This library only supports React Native 0.79 and above with new architecture enabled.\n\n```sh\nyarn add @react-native-community/javascriptcore\n```\n\n### iOS\n\nInstall pods:\n\n```sh\ncd ios \u0026\u0026 USE_THIRD_PARTY_JSC=1 USE_HERMES=0 bundle exec pod install\n```\n\u003e [!NOTE]  \n\u003e Note: `USE_THIRD_PARTY_JSC=1` is required to use JavaScriptCore from this package until JavaScriptCore is removed from core react-native.\n\n### Android\n\nAdd the following to your `android/gradle.properties`:\n\n```properties\n# Disable Hermes\nhermesEnabled=false\n\n# Enable third-party JSC\nuseThirdPartyJSC=true\n```\n\n## Usage\n\n### iOS\n\nOpen AppDelegate.swift and overwrite `createJSRuntimeFactory` method:\n\n```diff\nimport React\nimport React_RCTAppDelegate\nimport ReactAppDependencyProvider\nimport UIKit\n+import ReactJSC\n\n// AppDelegate code\n\nclass ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {\n  override func sourceURL(for bridge: RCTBridge) -\u003e URL? {\n    self.bundleURL()\n  }\n\n  override func bundleURL() -\u003e URL? {\n    #if DEBUG\n    RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: \"index\")\n    #else\n    Bundle.main.url(forResource: \"main\", withExtension: \"jsbundle\")\n    #endif\n  }\n\n+  override func createJSRuntimeFactory() -\u003e JSRuntimeFactoryRef {\n+    jsrt_create_jsc_factory() // Use JavaScriptCore runtime\n+  }\n}\n```\n\n### Android\n\nOpen `MainApplication.java` and overwrite `getJavaScriptExecutorFactory` method:\n\n```diff\n+import io.github.reactnativecommunity.javascriptcore.JSCExecutorFactory\n+import io.github.reactnativecommunity.javascriptcore.JSCRuntimeFactory\n+import com.facebook.react.bridge.JavaScriptExecutorFactory\n+import com.facebook.react.modules.systeminfo.AndroidInfoHelpers\n\nclass MainApplication : Application(), ReactApplication {\n\n  override val reactNativeHost: ReactNativeHost =\n      object : DefaultReactNativeHost(this) {\n        override fun getPackages(): List\u003cReactPackage\u003e =\n            PackageList(this).packages.apply {\n              // Packages that cannot be autolinked yet can be added manually here, for example:\n              // add(MyReactNativePackage())\n            }\n\n        override fun getJSMainModuleName(): String = \"index\"\n\n        override fun getUseDeveloperSupport(): Boolean = BuildConfig.DEBUG\n\n        override val isNewArchEnabled: Boolean = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED\n        override val isHermesEnabled: Boolean = BuildConfig.IS_HERMES_ENABLED\n\n+        override fun getJavaScriptExecutorFactory(): JavaScriptExecutorFactory =\n+          JSCExecutorFactory(packageName, AndroidInfoHelpers.getFriendlyDeviceName())\n      }\n\n+  override val reactHost: ReactHost\n+    get() = getDefaultReactHost(applicationContext, reactNativeHost, JSCRuntimeFactory())\n\n  override fun onCreate() {\n    super.onCreate()\n    SoLoader.init(this, OpenSourceMergedSoMapping)\n    if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {\n      // If you opted-in for the New Architecture, we load the native entry point for this app.\n      load()\n    }\n  }\n}\n```\n\n## Maintainers\n\n- [Callstack](https://callstack.com/) – A Total Software Engineering Consultancy that transforms organizations and teams through transformative apps.\n- [Expo](https://expo.dev/) - An open-source platform for making universal native apps for Android, iOS, and the web with JavaScript and React.\n\n### Special Thanks\n\nSpecial thanks to the team who worked on the initial extraction of JavaScriptCore from core react-native:\n\n- [Riccardo Cipolleschi](https://github.com/cipolleschi)\n- [Nicola Corti](https://github.com/cortinico)\n- [Kudo Chien](https://github.com/Kudo)\n- [Oskar Kwaśniewski](https://github.com/okwasniewski)\n- [jsc-android](https://github.com/react-native-community/jsc-android-buildscripts) - This project uses **jsc-android** under the hood, which is supported by [Expo](https://expo.dev), [Software Mansion](https://swmansion.com/), and [Wix](https://www.wix.engineering/).\n\n## License\n\nEverything inside this repository is [MIT licensed](./LICENSE).\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-community%2Fjavascriptcore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-native-community%2Fjavascriptcore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-native-community%2Fjavascriptcore/lists"}