Skip to content

Commit 50f1026

Browse files
authored
Merge pull request #1 from expo/readme
Change LOCAL_WORKDIR_PATH to `pwd` in the README + rewrite some sentences
2 parents 66ff832 + 81a48c6 commit 50f1026

File tree

1 file changed

+13
-16
lines changed

1 file changed

+13
-16
lines changed

README.md

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,32 @@
11
# JSC build scripts for Android
22

3-
The aim of this project is to provide a maintainable build scripts for [JavaScriptCore](https://www.webkit.org) javascript engine that would allow the [React Native](https://github.com/facebook/react-native) community to incorporate up to date releases of JSC into the framework on Android.
4-
5-
This project is based on [facebook/android-jsc](https://github.com/facebook/android-jsc) but instead of rewriting JSC builds scripts in BUCK it relies on cmake build scripts maintained in GTK branch of WebKit maintained by the WebkitGTK team (great work btw!). Thanks to that with just a small amount of work we should be able to build not only current but also future releases of JSC. An obvious benefit for everyone using react native is that this will allow to update JSC version on android version much more often than before (note that [facebook/android-jsc](https://github.com/facebook/android-jsc) uses JSC version from Nov 2014), especially that react native on iOS uses builtin instance of JSC library which gets regular updates with every version of iOS (see [this](https://opensource.apple.com/) as a reference).
6-
3+
The aim of this project is to provide maintainable build scripts for the [JavaScriptCore](https://www.webkit.org) JavaScript engine and allow the [React Native](https://github.com/facebook/react-native) community to incorporate up-to-date releases of JSC into the framework on Android.
74

5+
This project is based on [facebook/android-jsc](https://github.com/facebook/android-jsc) but instead of rewriting JSC's build scripts into BUCK files, it relies on CMake build scripts maintained in a GTK branch of WebKit maintained by the WebKitGTK team (great work btw!). Thanks to that, with just a small amount of work we should be able to build not only current but also future releases of JSC. An obvious benefit for everyone using React Native is that this will allow us to update JSC for React Native on Android much more often than before (note that [facebook/android-jsc](https://github.com/facebook/android-jsc) uses JSC version from Nov 2014), which is especially helpful since React Native on iOS uses the built-in copy of JSC that is updated with each major iOS release (see [this](https://opensource.apple.com/) as a reference).
86

97
## Requirements
108

11-
12-
There is a huge list of requirements that needs to be installed on your system in order to be able to cross-compile JSC for android. To simplify the process of setting up the environment we provide a docker image that comes with everything you will need. If you decide to use our docker the only thing you need to do is to prefix each command with this:
9+
There is a huge list of requirements that need to be installed on your system in order to be able to cross-compile JSC for Android. To simplify the process of setting up the environment we provide a Docker image that comes with everything you will need. If you decide to use our Docker image, the only thing you need to do is to prefix each command with this:
1310
```sh
14-
docker run -vLOCAL_WORKDIR_PATH:/bitrise/src --rm swmansion/jsc-android-buildscripts
11+
docker run -v `pwd`:/bitrise/src --rm swmansion/jsc-android-buildscripts
1512
```
1613

1714
##### Example:
1815

1916
```sh
20-
docker run -vLOCAL_WORKDIR_PATH:/bitrise/src --rm swmansion/jsc-android-buildscripts ./fetch_sources.sh
17+
docker run -v `pwd`:/bitrise/src --rm swmansion/jsc-android-buildscripts ./fetch_sources.sh
2118
```
2219

23-
#### Don't want to use docker
20+
#### Don't want to use Docker
2421

25-
As mentioned the list of dependencies is huge, we tried to list everything what's needed below:
22+
As mentioned the list of dependencies is huge, we tried to list everything that is needed below:
2623
- Android SDK & NDK
27-
- ruby (2.3), python (2.7), node (7.x), git, svn, gperf
28-
- cmake installed via Android SDK manager
24+
- Ruby (2.3), Python (2.7), Node (7.x), Git, SVN, gperf
25+
- CMake installed via Android SDK manager
2926

3027
## Build instructions
3128

32-
> **IMPORTANT:** Remember to prefix each command with an appropriate docker instruction given above when using our docker image
29+
> **IMPORTANT:** Remember to prefix each command with the appropriate Docker command given above when using our Docker image
3330
3431
1. `git clone https://github.com/SoftwareMansion/jsc-android-buildscripts.git .`
3532
2. `./fetch_sources.sh`
@@ -38,19 +35,19 @@ As mentioned the list of dependencies is huge, we tried to list everything what'
3835
5. `./all.sh`
3936
6. `./gradlew installArchives` (add `-w /bitrise/src/lib` to `docker run` args)
4037

41-
The maven repo containing android-jsc aar will be available at `LOCAL_WORKDIR_PATH/lib/android`.
38+
The Maven repo containing the android-jsc AAR will be available at `./lib/android`.
4239

4340
## Distribution
4441

4542
(TODO)
4643

4744
## How to use it with React Native
4845

49-
We will be working on getting react-native core updated in order to use new version of JSC. Once that gets approved the only thing you will need to do is to update your RN version! Until then you can fork react-native and patch it with [this patch](./patches/react-native.patch).
46+
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! Until then you can fork React Native and patch it with [this patch](./patches/react-native.patch).
5047

5148
## Testing
5249

53-
As a part of this project we provide a patch to react-native source code that allows for measuring react native application cold-start time. The methodology behind this test is to modify the part of the code that is responsible for loading JS bundle into the JS VM such that we measure and store the execution time, then we modify the process of instantiating the bridge in a way that allows for running in multiple times. To learn more about how the perf tests work and how to perform them refer to [this document](./TESTING.md). Results for Samsung Galaxy S4 are presented below:
50+
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:
5451

5552
| | android-jsc (r174650) | new JSC (r216995) |
5653
| -------------------- |----------------------:| -----------------:|

0 commit comments

Comments
 (0)