Commit ef7293e
authored
Use NAPI over JSI over JSC (#47)
This change switches Babylon Native to use NAPI over JSI.
Notes:
* There are outstanding issues with the JSI implementation over JSC and thus we currently have a custom JSCRuntime.h and JSCRuntime.cpp to compensate. These changes will need to be upstreamed to Facebook in the future.
* Not all of the NAPI contract is implemented yet, but enough is implemented so that the default app runs with XR support.
* Returning NAPI types that don't match exactly with the return type (e.g. returning a Napi::Object for a function that returns Napi::Value will result in a C++ warning only when using NAPI/JSI). You must add an std::move in this situation as will be indicated by a note following the warning.
* Performance is slower with JSI due to various reasons. This will be documented in the future along with measurements.
* Code has been tested with Hermes which adds additional slowness.1 parent 145e837 commit ef7293e
File tree
7 files changed
+1547
-257
lines changed- Apps/Playground/node_modules/@babylonjs/react-native
- android
- src/main/cpp
- ios
- submodules
7 files changed
+1547
-257
lines changed
0 commit comments