You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

jsc-android

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 216113.0.0-beta.5 to 216113.0.0

android/org/webkit/android-jsc-intl/maven-metadata.xml

2

package.json
{
"name": "jsc-android",
"version": "216113.0.0-beta.5",
"version": "216113.0.0",
"description": "Pre-build version of JavaScriptCore to be used by React Native apps",

@@ -5,0 +5,0 @@ "repository": {

@@ -36,3 +36,3 @@ # JSC build scripts for Android

5. `./all.sh`
6. `./gradlew installArchives` (add `-w /bitrise/src/lib` to `docker run` args)
6. `./gradlew lib:installArchives libIntl:installArchives` (add `-w /bitrise/src/lib` to `docker run` args)

@@ -54,3 +54,3 @@ The Maven repo containing the android-jsc AAR will be available at `./lib/android`.

dependencies {
+ "jsc-android": "^216113.0.0-beta.5",
+ "jsc-android": "^216113.0.0",
```

@@ -95,18 +95,55 @@

## How to use it with React Native
## International variant
We will be working on updating React Native to use a new version of JSC. Once that gets approved the only thing you will need to do is to update your RN version!
Starting with 216113.0.0 version, we provide two build variants which differ in i18n support.
### Default variant
By default we ship with no international support. Methods like `Date.toLocaleString` will act as `Date.toString`. `String.localeCompare` will just compare each character's byte value.
### International variant
International variant includes ICU i18n library and necessary data allowing to use e.g. `Date.toLocaleString` and `String.localeCompare` that give correct results when using with locales other than `en-US`. Note that this variant is about 6MiB larger per architecture than default.
To use this variant instead replace patch from the third installation step with:
```diff
}
+configurations.all {
+ resolutionStrategy {
+ eachDependency { DependencyResolveDetails details ->
+ if (details.requested.name == 'android-jsc') {
+ details.useTarget group: details.requested.group, name: 'android-jsc-intl', version: 'r216113'
+ }
+ }
+ }
+}
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
```
Note that using variant with i18n support will have some significant impact on the binary size as the ICU library will need to be distributed along with ICU-data library which contains data helpful with localizing numbers/dates/collation/etc for all possible locales. Here is the summary of all the libraries sizes (including JSC) when using i18n variant.
| | new JSC intl variant (r216113) |
| -------------------- |-------------------------------:|
| binary size (armv7) | 11.2 MiB |
| binary size (x86) | 15.6 MiB |
| binary size (arm64) | 14.4 MiB |
| binary size (x86_64) | 15.2 MiB |
## Testing
As a part of this project we provide a patch to the React Native source code that allows for measuring a React Native application's cold-start time. The methodology behind this test is to modify the part of the code that is responsible for loading JS bundles into the JS VM such that we measure and store the execution time, and to modify the process of instantiating the bridge so we can run it multiple times. To learn more about how the perf tests work and how to perform them, refer to [this document](./TESTING.md). Results for the Samsung Galaxy S4 are presented below:
As a part of this project we provide a patch to the React Native source code that allows for measuring a React Native application's cold-start. The methodology behind this test is to modify the part of the code that is responsible for loading JS bundles into the JS VM such that we measure and store the execution time, and to modify the process of instantiating the bridge so we can run it multiple times. To learn more about how the perf tests work and how to perform them, refer to [this document](./TESTING.md). Results for the Samsung Galaxy S4 are presented below, cold start has been measured on rather large React Native app with minified bundle of size at around 3M:
| | android-jsc (r174650) | new JSC (r216113) |
| -------------------- |----------------------:| -----------------:|
| cold start time | 427 ms | ? ms |
| binary size (armv7) | 1.8 MiB | 4.4 MiB |
| binary size (x86) | 4.4 MiB | 7.5 MiB |
| binary size (arm64) | N/A | 6.7 MiB |
| binary size (x86_64) | N/A | 7.4 MiB |
| cold start time | 2530 ms | 2150 ms (-15%) |
| binary size (armv7) | 1.8 MiB | 4.3 MiB |
| binary size (x86) | 4.4 MiB | 7.4 MiB |
| binary size (arm64) | N/A | 6.5 MiB |
| binary size (x86_64) | N/A | 7.2 MiB |
## Credits

@@ -113,0 +150,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc