Below is the app size increase to be expected when adding React Native Skia to your project.
|6 MB||4 MB||7,2 MB|
React Native Skia includes both prebuilt library files and C++ files that are compiled and linked with your app when being built - adding to the size of your app.
For a regular arm 64-bit Android device, the increased download size will be around 4 MB added after adding React Native Skia - on iOS, the increased download size will be around 6 MB.
On Web, the increase will be around 7,2 MB, which can be reduced by distributing the included CanvasKit Web Assembly file through a CDN (learn more).
Below is an explanation of how these numbers were found - using a bare-bones React Native app created with
npx react-native init before and after adding React Native Skia.
On Android you should use App Bundles to ensure that only the required files are downloaded to your user’s devices.
When building an APK in release mode, you will see an increase of 41.3 MB after adding React Native Skia.
This is because the library is built for different target architectures.
If we take
arm-64-bit for instance, the
librnskia.so library file is only around 3,8 MB.
Unlike Android, there is no standard way to find the app size increase on iOS - but by archiving and distributing our build using the Ad-Hoc distribution method, we'll find some numbers in the report "App Thinning Size.txt":
Base app: 2,6 MB compressed, 7,2 MB uncompressed
With React Native Skia: 5,2 MB compressed, 13 MB uncompressed
The NPM download is much bigger than these numbers indicate because we need to distribute Skia for all target platforms. On iOS, it is also required to distribute the bitcode (intermediate representation of a compiled program that can be used to recompile the program). This requirement will be removed in the future.