diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0c7ff3c..6e600f2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -52,6 +52,8 @@ jobs: build-android: runs-on: ubuntu-latest + # Skip Android builds + if: false env: TURBO_CACHE_DIR: .turbo/android steps: @@ -133,22 +135,10 @@ jobs: echo "turbo_cache_hit=1" >> $GITHUB_ENV fi - - name: Cache cocoapods - if: env.turbo_cache_hit != 1 - id: cocoapods-cache - uses: actions/cache@v3 - with: - path: | - **/ios/Pods - key: ${{ runner.os }}-cocoapods-${{ hashFiles('example/ios/Podfile.lock') }} - restore-keys: | - ${{ runner.os }}-cocoapods- - - name: Install cocoapods - if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true' run: | - cd example/ios - pod install + cd example + pod install --project-directory=ios env: NO_FLIPPER: 1 diff --git a/cpp/react-native-basis-universal.cpp b/cpp/react-native-basis-universal.cpp index 9cd6fab..155e2a6 100644 --- a/cpp/react-native-basis-universal.cpp +++ b/cpp/react-native-basis-universal.cpp @@ -1,5 +1,12 @@ #include "react-native-basis-universal.h" +#define DEFINE_BASIS_ENCODER_PARAMS_SETTER(func_name, param_name, param_type) \ +void ReactNativeBasisUniversal::func_name(jsi::Runtime &rt, jsi::Object handle, param_type flag) { \ + auto encoder = tryGetBasisEncoder(rt, handle); \ + encoder->m_params.param_name = flag; \ +} + + using namespace basist; using namespace basisu; @@ -14,26 +21,26 @@ std::shared_ptr tryGetBasisEncoder(jsi::Runtime& rt, jsi::Object& if (!basisEncoderObj.hasNativeState(rt)) { return nullptr; } - + auto encoder = std::dynamic_pointer_cast(basisEncoderObj.getNativeState(rt)); return encoder; } ReactNativeBasisUniversal::ReactNativeBasisUniversal(std::shared_ptr jsInvoker) -: NativeBasisUniversalCxxSpecJSI(jsInvoker), _callInvoker(jsInvoker) {} +: NativeBasisUniversalCxxSpecJSI(jsInvoker) {} void ReactNativeBasisUniversal::initializeBasis(jsi::Runtime &rt) { if (basis_initialized_flag) { return; } - + #if BASISU_SUPPORT_ENCODING basisu_encoder_init(); #endif - + basisu_transcoder_init(); - + basis_initialized_flag = true; } @@ -43,49 +50,225 @@ jsi::Object ReactNativeBasisUniversal::createBasisHandle(jsi::Runtime &rt) { return basisObject; } -void ReactNativeBasisUniversal::setDebug(jsi::Runtime &rt, jsi::Object handle, bool flag) { +int ReactNativeBasisUniversal::encode(jsi::Runtime &rt, jsi::Object handle, jsi::Object basisFileData) { auto encoder = tryGetBasisEncoder(rt, handle); - encoder->m_params.m_debug = flag; -} -void ReactNativeBasisUniversal::setCreateKTX2File(jsi::Runtime &rt, jsi::Object handle, bool flag) { - auto encoder = tryGetBasisEncoder(rt, handle); - encoder->m_params.m_create_ktx2_file = flag; + if (!basisFileData.isArrayBuffer(rt)) { + throw jsi::JSError(rt, "Image Array needs to be ArrayBuffer"); + } + + auto arrayBuffer = basisFileData.getArrayBuffer(rt); + + if (!basis_initialized_flag) + { + assert(0); + return 0; + } + + job_pool jpool(6); + + // Initialize the compression parameters structure. This is the same structure that the command line tool fills in. + basis_compressor_params ¶ms = encoder->m_params; + + params.m_pJob_pool = &jpool; + + params.m_multithreading = true; + + params.m_status_output = params.m_debug; + + params.m_read_source_images = false; + params.m_write_output_basis_or_ktx2_files = false; + + basis_compressor comp; + + if (!comp.init(params)) + { + return 0; + } + + basis_compressor::error_code ec = comp.process(); + + if (ec != basis_compressor::cECSuccess) + { + // Something failed during compression. + return 0; + } + + if (params.m_create_ktx2_file) + { + // Compression succeeded, so copy the .ktx2 file bytes to the caller's buffer. + auto output = comp.get_output_ktx2_file(); + + if (!output.data()) { + return 0; + } + + auto outputBuffer = jsi::ArrayBuffer(std::move(arrayBuffer)); + memcpy(outputBuffer.data(rt), output.data(), output.size()); + basisFileData.setProperty(rt, jsi::PropNameID::forAscii(rt, "buffer"), outputBuffer); + + + // Return the file size of the .basis file in bytes. + return (uint32_t)comp.get_output_ktx2_file().size(); + } + else + { + auto output = comp.get_output_basis_file(); + + if (!output.data()) { + return 0; + } + + // Compression succeeded, so copy the .basis file bytes to the caller's buffer. + auto outputBuffer = jsi::ArrayBuffer(std::move(arrayBuffer)); + memcpy(outputBuffer.data(rt), output.data(), output.size()); + basisFileData.setProperty(rt, jsi::PropNameID::forAscii(rt, "buffer"), outputBuffer); + + // Return the file size of the .basis file in bytes. + return (uint32_t)comp.get_output_basis_file().size(); + } + + return 0; } -void ReactNativeBasisUniversal::setComputeStats(jsi::Runtime &rt, jsi::Object handle, bool flag) { +void ReactNativeBasisUniversal::setKTX2UASTCSupercompression(jsi::Runtime &rt, jsi::Object handle, bool flag) { auto encoder = tryGetBasisEncoder(rt, handle); - encoder->m_params.m_compute_stats = flag; + encoder->m_params.m_ktx2_uastc_supercompression = flag ? basist::KTX2_SS_ZSTANDARD : basist::KTX2_SS_NONE; } -void ReactNativeBasisUniversal::setUASTC(jsi::Runtime &rt, jsi::Object handle, bool flag) { +void ReactNativeBasisUniversal::setQualityLevel(jsi::Runtime &rt, jsi::Object handle, int qualityLevel) { auto encoder = tryGetBasisEncoder(rt, handle); - encoder->m_params.m_uastc = flag; + assert(qualityLevel >= -1 && qualityLevel <= BASISU_QUALITY_MAX); + encoder->m_params.m_quality_level = qualityLevel; } -void ReactNativeBasisUniversal::setKTX2UASTCSupercompression(jsi::Runtime &rt, jsi::Object handle, bool flag) { +bool ReactNativeBasisUniversal::setSliceSourceImage(jsi::Runtime &rt, jsi::Object handle, int sliceIndex, jsi::Object imageArray, int width, int height, bool isPng) { + if (!imageArray.isArrayBuffer(rt)) { + throw jsi::JSError(rt, "Image Array needs to be ArrayBuffer"); + } auto encoder = tryGetBasisEncoder(rt, handle); - encoder->m_params.m_ktx2_uastc_supercompression = flag ? basist::KTX2_SS_ZSTANDARD : basist::KTX2_SS_NONE;; -} -void ReactNativeBasisUniversal::setQualityLevel(jsi::Runtime &rt, jsi::Object handle, int qualityLevel) { - + if (sliceIndex >= encoder->m_params.m_source_images.size()) + encoder->m_params.m_source_images.resize(sliceIndex + 1); + + auto arrayBuffer = imageArray.getArrayBuffer(rt); + auto data = arrayBuffer.data(rt); + + image& src_img = encoder->m_params.m_source_images[sliceIndex]; + + if (isPng) + { + auto size = arrayBuffer.size(rt); + // It's a PNG file, so try and parse it. + if (!load_png(data, size, src_img, nullptr)) + { + return false; + } + + width = src_img.get_width(); + height = src_img.get_height(); + } + else + { + // It's a raw image, so check the buffer's size. + if (arrayBuffer.size(rt) != width * height * sizeof(uint32_t)) + { + return false; + } + + // Copy the raw image's data into our source image. + src_img.resize(width, height); + memcpy(src_img.get_ptr(), arrayBuffer.data(rt), width * height * sizeof(uint32_t)); + } + + return true; } -void ReactNativeBasisUniversal::setSliceSourceImage(jsi::Runtime &rt, jsi::Object handle, int sliceIndex, jsi::Object imageArray, int width, int height, bool isPng) { - if (imageArray.isArrayBuffer(rt)) { +bool ReactNativeBasisUniversal::setSliceSourceImageHDR(jsi::Runtime &rt, jsi::Object handle, int sliceIndex, jsi::Object imageArray, int width, int height, int imgType, bool ldrSrgbToLinear) { + if (!imageArray.isArrayBuffer(rt)) { throw jsi::JSError(rt, "Image Array needs to be ArrayBuffer"); } + auto encoder = tryGetBasisEncoder(rt, handle); + auto arrayBuffer = imageArray.getArrayBuffer(rt); auto data = arrayBuffer.data(rt); + + // Resize the source_images_hdr array if necessary + if (sliceIndex >= encoder->m_params.m_source_images_hdr.size()) + encoder->m_params.m_source_images_hdr.resize(sliceIndex + 1); + + // Now load the source image. + imagef& src_img = encoder->m_params.m_source_images_hdr[sliceIndex]; + + return load_image_hdr(data, + arrayBuffer.size(rt), + src_img, + width, + height, + (hdr_image_type)imgType, + ldrSrgbToLinear); } void ReactNativeBasisUniversal::setPackUASTCFlags(jsi::Runtime &rt, jsi::Object handle, int flags) { - + auto encoder = tryGetBasisEncoder(rt, handle); + assert((flags & cPackUASTCLevelMask) >= cPackUASTCLevelFastest); + assert((flags & cPackUASTCLevelMask) <= cPackUASTCLevelVerySlow); + encoder->m_params.m_pack_uastc_flags = flags; } void ReactNativeBasisUniversal::setCompressionLevel(jsi::Runtime &rt, jsi::Object handle, int level) { - + auto encoder = tryGetBasisEncoder(rt, handle); + assert(level >= 0 && level <= BASISU_MAX_COMPRESSION_LEVEL); + encoder->m_params.m_compression_level = level; +} + +void ReactNativeBasisUniversal::setNormalMap(jsi::Runtime &rt, jsi::Object handle) { + auto encoder = tryGetBasisEncoder(rt, handle); + encoder->m_params.m_perceptual = false; + encoder->m_params.m_mip_srgb = false; + encoder->m_params.m_no_selector_rdo = true; + encoder->m_params.m_no_endpoint_rdo = true; +} + +void ReactNativeBasisUniversal::setUASTCHDRQualityLevel(jsi::Runtime &rt, jsi::Object handle, int level) { + auto encoder = tryGetBasisEncoder(rt, handle); + assert((level >= basisu::astc_hdr_codec_options::cMinLevel) && (level <= basisu::astc_hdr_codec_options::cMaxLevel)); + encoder->m_params.m_uastc_hdr_options.set_quality_level(level); +} + +void ReactNativeBasisUniversal::setSwizzle(jsi::Runtime &rt, jsi::Object handle, int r, int g, int b, int a) { + auto encoder = tryGetBasisEncoder(rt, handle); + assert((r < 4) && (g < 4) && (b < 4) && (a < 4)); + encoder->m_params.m_swizzle[0] = static_cast(r); + encoder->m_params.m_swizzle[1] = static_cast(g); + encoder->m_params.m_swizzle[2] = static_cast(b); + encoder->m_params.m_swizzle[3] = static_cast(a); +} + +void ReactNativeBasisUniversal::setSelectorRDOThresh(jsi::Runtime &rt, jsi::Object handle, double threshold) { + auto encoder = tryGetBasisEncoder(rt, handle); + encoder->m_params.m_selector_rdo_thresh = static_cast(threshold); +} + +void ReactNativeBasisUniversal::setEndpointRDOThresh(jsi::Runtime &rt, jsi::Object handle, double threshold) { + auto encoder = tryGetBasisEncoder(rt, handle); + encoder->m_params.m_endpoint_rdo_thresh = static_cast(threshold); } +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setCheckForAlpha, m_check_for_alpha, bool); +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setForceAlpha, m_force_alpha, bool); +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setRenormalize, m_renormalize, bool); +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setMaxEndpointClusters, m_max_endpoint_clusters, int); +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setMaxSelectorClusters, m_max_selector_clusters, int); +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setMipSRGB, m_mip_srgb, bool); +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setMipRenormalize, m_mip_renormalize, bool); +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setKTX2SRGBTransferFunc, m_ktx2_srgb_transfer_func, bool); +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setYFlip, m_y_flip, bool); +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setMipGen, m_mip_gen, bool); +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setPerceptual, m_perceptual, bool); +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setUASTC, m_uastc, bool); +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setComputeStats, m_compute_stats, bool); +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setCreateKTX2File, m_create_ktx2_file, bool); +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setDebug, m_debug, bool); +DEFINE_BASIS_ENCODER_PARAMS_SETTER(setHDR, m_hdr, bool); } diff --git a/cpp/react-native-basis-universal.h b/cpp/react-native-basis-universal.h index b9d8db6..48776a4 100644 --- a/cpp/react-native-basis-universal.h +++ b/cpp/react-native-basis-universal.h @@ -28,13 +28,30 @@ class ReactNativeBasisUniversal : public NativeBasisUniversalCxxSpecJSI { void setUASTC(jsi::Runtime &rt, jsi::Object handle, bool flag) override; void setCompressionLevel(jsi::Runtime &rt, jsi::Object handle, int level) override; void setKTX2UASTCSupercompression(jsi::Runtime &rt, jsi::Object handle, bool flag) override; - void setSliceSourceImage(jsi::Runtime &rt, jsi::Object handle, int sliceIndex, jsi::Object imageArray, int width, int height, bool isPng) override; + bool setSliceSourceImage(jsi::Runtime &rt, jsi::Object handle, int sliceIndex, jsi::Object imageArray, int width, int height, bool isPng) override; void setPackUASTCFlags(jsi::Runtime &rt, jsi::Object handle, int flags) override; void setQualityLevel(jsi::Runtime &rt, jsi::Object handle, int qualityLevel) override; - + int encode(jsi::Runtime &rt, jsi::Object handle, jsi::Object basisFileData) override; + void setPerceptual(jsi::Runtime &rt, jsi::Object handle, bool flag) override; + void setYFlip(jsi::Runtime &rt, jsi::Object handle, bool flag) override; + void setMipGen(jsi::Runtime &rt, jsi::Object handle, bool flag) override; + void setNormalMap(jsi::Runtime &rt, jsi::Object handle) override; + void setKTX2SRGBTransferFunc(jsi::Runtime &rt, jsi::Object handle, bool flag) override; + void setMipSRGB(jsi::Runtime &rt, jsi::Object handle, bool flag) override; + void setMipRenormalize(jsi::Runtime &rt, jsi::Object handle, bool flag) override; + bool setSliceSourceImageHDR(jsi::Runtime &rt, jsi::Object handle, int sliceIndex, jsi::Object imageArray, int width, int height, int imgType, bool ldrSrgbToLinear) override; + void setHDR(jsi::Runtime &rt, jsi::Object handle, bool flag) override; + void setUASTCHDRQualityLevel(jsi::Runtime &rt, jsi::Object handle, int level) override; + void setCheckForAlpha(jsi::Runtime &rt, jsi::Object handle, bool flag) override; + void setForceAlpha(jsi::Runtime &rt, jsi::Object handle, bool flag) override; + void setSwizzle(jsi::Runtime &rt, jsi::Object handle, int r, int g, int b, int a) override; + void setRenormalize(jsi::Runtime &rt, jsi::Object handle, bool flag) override; + void setMaxEndpointClusters(jsi::Runtime &rt, jsi::Object handle, int maxClusters) override; + void setMaxSelectorClusters(jsi::Runtime &rt, jsi::Object handle, int maxClusters) override; + void setSelectorRDOThresh(jsi::Runtime &rt, jsi::Object handle, double threshold) override; + void setEndpointRDOThresh(jsi::Runtime &rt, jsi::Object handle, double threshold) override; private: - std::shared_ptr _callInvoker; bool basis_initialized_flag; }; diff --git a/example/ios/Podfile b/example/ios/Podfile index beb4964..f70e1c9 100644 --- a/example/ios/Podfile +++ b/example/ios/Podfile @@ -11,6 +11,11 @@ workspace 'BasisUniversalExample.xcworkspace' options = { :fabric_enabled => true, :bridgeless_enabled => true, + :hermes_enabled => true, } -use_test_app! options +use_test_app! options do |target| + target.app do + pod 'Resources', :path => './Resources' + end +end diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index a5f2185..175face 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -4,6 +4,9 @@ PODS: - FBLazyVector (0.75.4) - fmt (9.1.0) - glog (0.3.5) + - hermes-engine (0.75.4): + - hermes-engine/Pre-built (= 0.75.4) + - hermes-engine/Pre-built (0.75.4) - RCT-Folly (2024.01.01.00): - boost - DoubleConversion @@ -42,12 +45,13 @@ PODS: - React-callinvoker (0.75.4) - React-Core (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTDeprecation - React-Core/Default (= 0.75.4) - React-cxxreact - React-featureflags - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-jsinspector @@ -58,12 +62,13 @@ PODS: - Yoga - React-Core/CoreModulesHeaders (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTDeprecation - React-Core/Default - React-cxxreact - React-featureflags - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-jsinspector @@ -74,11 +79,12 @@ PODS: - Yoga - React-Core/Default (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTDeprecation - React-cxxreact - React-featureflags - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-jsinspector @@ -89,13 +95,14 @@ PODS: - Yoga - React-Core/DevSupport (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTDeprecation - React-Core/Default (= 0.75.4) - React-Core/RCTWebSocket (= 0.75.4) - React-cxxreact - React-featureflags - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-jsinspector @@ -106,12 +113,13 @@ PODS: - Yoga - React-Core/RCTActionSheetHeaders (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTDeprecation - React-Core/Default - React-cxxreact - React-featureflags - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-jsinspector @@ -122,12 +130,13 @@ PODS: - Yoga - React-Core/RCTAnimationHeaders (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTDeprecation - React-Core/Default - React-cxxreact - React-featureflags - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-jsinspector @@ -138,12 +147,13 @@ PODS: - Yoga - React-Core/RCTBlobHeaders (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTDeprecation - React-Core/Default - React-cxxreact - React-featureflags - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-jsinspector @@ -154,12 +164,13 @@ PODS: - Yoga - React-Core/RCTImageHeaders (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTDeprecation - React-Core/Default - React-cxxreact - React-featureflags - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-jsinspector @@ -170,12 +181,13 @@ PODS: - Yoga - React-Core/RCTLinkingHeaders (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTDeprecation - React-Core/Default - React-cxxreact - React-featureflags - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-jsinspector @@ -186,12 +198,13 @@ PODS: - Yoga - React-Core/RCTNetworkHeaders (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTDeprecation - React-Core/Default - React-cxxreact - React-featureflags - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-jsinspector @@ -202,12 +215,13 @@ PODS: - Yoga - React-Core/RCTSettingsHeaders (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTDeprecation - React-Core/Default - React-cxxreact - React-featureflags - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-jsinspector @@ -218,12 +232,13 @@ PODS: - Yoga - React-Core/RCTTextHeaders (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTDeprecation - React-Core/Default - React-cxxreact - React-featureflags - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-jsinspector @@ -234,12 +249,13 @@ PODS: - Yoga - React-Core/RCTVibrationHeaders (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTDeprecation - React-Core/Default - React-cxxreact - React-featureflags - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-jsinspector @@ -250,12 +266,13 @@ PODS: - Yoga - React-Core/RCTWebSocket (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTDeprecation - React-Core/Default (= 0.75.4) - React-cxxreact - React-featureflags - - React-jsc + - React-hermes - React-jsi - React-jsiexecutor - React-jsinspector @@ -283,6 +300,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - React-callinvoker (= 0.75.4) - React-debug (= 0.75.4) @@ -295,6 +313,7 @@ PODS: - React-defaultsnativemodule (0.75.4): - DoubleConversion - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -307,7 +326,6 @@ PODS: - React-graphics - React-idlecallbacksnativemodule - React-ImageManager - - React-jsi - React-microtasksnativemodule - React-NativeModulesApple - React-RCTFabric @@ -320,6 +338,7 @@ PODS: - React-domnativemodule (0.75.4): - DoubleConversion - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -330,7 +349,6 @@ PODS: - React-featureflags - React-graphics - React-ImageManager - - React-jsi - React-NativeModulesApple - React-RCTFabric - React-rendererdebug @@ -343,6 +361,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -366,7 +385,6 @@ PODS: - React-Fabric/uimanager (= 0.75.4) - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -378,6 +396,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -386,7 +405,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -398,6 +416,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -406,7 +425,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -418,6 +436,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -426,7 +445,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -438,6 +456,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -446,7 +465,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -458,6 +476,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -469,7 +488,6 @@ PODS: - React-Fabric/components/view (= 0.75.4) - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -481,6 +499,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -489,7 +508,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -501,6 +519,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -509,7 +528,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -521,6 +539,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -529,7 +548,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -542,6 +560,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -550,7 +569,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -562,6 +580,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -570,7 +589,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -582,6 +600,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -590,7 +609,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -602,6 +620,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -610,7 +629,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -622,6 +640,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -630,7 +649,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -642,6 +660,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -651,7 +670,6 @@ PODS: - React-Fabric/observers/events (= 0.75.4) - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -663,6 +681,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -671,7 +690,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -683,6 +701,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -692,7 +711,6 @@ PODS: - React-Fabric/observers/events - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -705,6 +723,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -713,7 +732,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -725,6 +743,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -733,7 +752,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -745,6 +763,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -754,7 +773,6 @@ PODS: - React-Fabric/uimanager/consistency (= 0.75.4) - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -767,6 +785,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -775,7 +794,6 @@ PODS: - React-debug - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -788,6 +806,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -799,7 +818,6 @@ PODS: - React-FabricComponents/textlayoutmanager (= 0.75.4) - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -813,6 +831,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -831,7 +850,6 @@ PODS: - React-FabricComponents/components/unimplementedview (= 0.75.4) - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -845,6 +863,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -854,7 +873,6 @@ PODS: - React-Fabric - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -868,6 +886,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -877,7 +896,6 @@ PODS: - React-Fabric - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -891,6 +909,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -900,7 +919,6 @@ PODS: - React-Fabric - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -914,6 +932,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -923,7 +942,6 @@ PODS: - React-Fabric - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -937,6 +955,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -946,7 +965,6 @@ PODS: - React-Fabric - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -960,6 +978,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -969,7 +988,6 @@ PODS: - React-Fabric - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -983,6 +1001,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -992,7 +1011,6 @@ PODS: - React-Fabric - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -1006,6 +1024,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -1015,7 +1034,6 @@ PODS: - React-Fabric - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -1029,6 +1047,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -1038,7 +1057,6 @@ PODS: - React-Fabric - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -1052,6 +1070,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -1061,7 +1080,6 @@ PODS: - React-Fabric - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-logger @@ -1075,13 +1093,13 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - RCTRequired (= 0.75.4) - RCTTypeSafety (= 0.75.4) - React-Fabric - React-graphics - React-ImageManager - - React-jsc - React-jsi - React-jsiexecutor (= 0.75.4) - React-logger @@ -1093,6 +1111,7 @@ PODS: - React-featureflagsnativemodule (0.75.4): - DoubleConversion - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -1102,7 +1121,6 @@ PODS: - React-featureflags - React-graphics - React-ImageManager - - React-jsi - React-NativeModulesApple - React-RCTFabric - React-rendererdebug @@ -1119,9 +1137,22 @@ PODS: - React-jsi - React-jsiexecutor - React-utils + - React-hermes (0.75.4): + - DoubleConversion + - fmt (= 9.1.0) + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - React-cxxreact (= 0.75.4) + - React-jsi + - React-jsiexecutor (= 0.75.4) + - React-jsinspector + - React-perflogger (= 0.75.4) + - React-runtimeexecutor - React-idlecallbacksnativemodule (0.75.4): - DoubleConversion - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -1131,7 +1162,6 @@ PODS: - React-featureflags - React-graphics - React-ImageManager - - React-jsi - React-NativeModulesApple - React-RCTFabric - React-rendererdebug @@ -1150,11 +1180,6 @@ PODS: - React-graphics - React-rendererdebug - React-utils - - React-jsc (0.75.4): - - React-jsc/Fabric (= 0.75.4) - - React-jsi (= 0.75.4) - - React-jsc/Fabric (0.75.4): - - React-jsi (= 0.75.4) - React-jserrorhandler (0.75.4): - RCT-Folly/Fabric (= 2024.01.01.00) - React-debug @@ -1164,11 +1189,13 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - React-jsiexecutor (0.75.4): - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - React-cxxreact (= 0.75.4) - React-jsi (= 0.75.4) @@ -1177,6 +1204,7 @@ PODS: - React-jsinspector (0.75.4): - DoubleConversion - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - React-featureflags - React-jsi @@ -1191,6 +1219,7 @@ PODS: - React-microtasksnativemodule (0.75.4): - DoubleConversion - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -1200,7 +1229,6 @@ PODS: - React-featureflags - React-graphics - React-ImageManager - - React-jsi - React-NativeModulesApple - React-RCTFabric - React-rendererdebug @@ -1212,6 +1240,28 @@ PODS: - react-native-basis-universal (0.1.0): - DoubleConversion - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga + - react-native-blob-util (0.19.11): + - DoubleConversion + - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -1221,7 +1271,6 @@ PODS: - React-featureflags - React-graphics - React-ImageManager - - React-jsi - React-NativeModulesApple - React-RCTFabric - React-rendererdebug @@ -1233,10 +1282,10 @@ PODS: - React-nativeconfig (0.75.4) - React-NativeModulesApple (0.75.4): - glog + - hermes-engine - React-callinvoker - React-Core - React-cxxreact - - React-jsc - React-jsi - React-jsinspector - React-runtimeexecutor @@ -1267,7 +1316,7 @@ PODS: - React-Fabric - React-featureflags - React-graphics - - React-jsc + - React-hermes - React-nativeconfig - React-NativeModulesApple - React-RCTFabric @@ -1276,6 +1325,7 @@ PODS: - React-rendererdebug - React-RuntimeApple - React-RuntimeCore + - React-RuntimeHermes - React-runtimescheduler - React-utils - ReactCodegen @@ -1283,6 +1333,7 @@ PODS: - React-RCTBlob (0.75.4): - DoubleConversion - fmt (= 9.1.0) + - hermes-engine - RCT-Folly (= 2024.01.01.00) - React-Core/RCTBlobHeaders - React-Core/RCTWebSocket @@ -1294,6 +1345,7 @@ PODS: - ReactCommon - React-RCTFabric (0.75.4): - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - React-Core - React-debug @@ -1303,7 +1355,6 @@ PODS: - React-featureflags - React-graphics - React-ImageManager - - React-jsc - React-jsi - React-jsinspector - React-nativeconfig @@ -1365,12 +1416,12 @@ PODS: - React-debug - React-rncore (0.75.4) - React-RuntimeApple (0.75.4): + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - React-callinvoker - React-Core/Default - React-CoreModules - React-cxxreact - - React-jsc - React-jserrorhandler - React-jsi - React-jsiexecutor @@ -1380,14 +1431,15 @@ PODS: - React-RCTFabric - React-RuntimeCore - React-runtimeexecutor + - React-RuntimeHermes - React-runtimescheduler - React-utils - React-RuntimeCore (0.75.4): - glog + - hermes-engine - RCT-Folly/Fabric (= 2024.01.01.00) - React-cxxreact - React-featureflags - - React-jsc - React-jserrorhandler - React-jsi - React-jsiexecutor @@ -1397,14 +1449,25 @@ PODS: - React-utils - React-runtimeexecutor (0.75.4): - React-jsi (= 0.75.4) + - React-RuntimeHermes (0.75.4): + - hermes-engine + - RCT-Folly/Fabric (= 2024.01.01.00) + - React-featureflags + - React-hermes + - React-jsi + - React-jsinspector + - React-jsitracing + - React-nativeconfig + - React-RuntimeCore + - React-utils - React-runtimescheduler (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - React-callinvoker - React-cxxreact - React-debug - React-featureflags - - React-jsc - React-jsi - React-rendererconsistency - React-rendererdebug @@ -1412,13 +1475,14 @@ PODS: - React-utils - React-utils (0.75.4): - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - React-debug - - React-jsc - React-jsi (= 0.75.4) - ReactCodegen (0.75.4): - DoubleConversion - glog + - hermes-engine - RCT-Folly - RCTRequired - RCTTypeSafety @@ -1428,7 +1492,6 @@ PODS: - React-FabricImage - React-featureflags - React-graphics - - React-jsc - React-jsi - React-jsiexecutor - React-NativeModulesApple @@ -1442,6 +1505,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - React-callinvoker (= 0.75.4) - React-cxxreact (= 0.75.4) @@ -1454,6 +1518,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - React-callinvoker (= 0.75.4) - React-cxxreact (= 0.75.4) @@ -1464,6 +1529,7 @@ PODS: - DoubleConversion - fmt (= 9.1.0) - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - React-callinvoker (= 0.75.4) - React-cxxreact (= 0.75.4) @@ -1476,6 +1542,7 @@ PODS: - ReactNativeHost (0.5.0): - DoubleConversion - glog + - hermes-engine - RCT-Folly (= 2024.01.01.00) - RCTRequired - RCTTypeSafety @@ -1486,7 +1553,6 @@ PODS: - React-featureflags - React-graphics - React-ImageManager - - React-jsi - React-NativeModulesApple - React-RCTAppDelegate - React-RCTFabric @@ -1500,6 +1566,28 @@ PODS: - React-Core - React-jsi - ReactTestApp-Resources (1.0.0-dev) + - Resources (0.0.1-dev) + - RNCPicker (2.8.1): + - DoubleConversion + - glog + - hermes-engine + - RCT-Folly (= 2024.01.01.00) + - RCTRequired + - RCTTypeSafety + - React-Core + - React-debug + - React-Fabric + - React-featureflags + - React-graphics + - React-ImageManager + - React-NativeModulesApple + - React-RCTFabric + - React-rendererdebug + - React-utils + - ReactCodegen + - ReactCommon/turbomodule/bridging + - ReactCommon/turbomodule/core + - Yoga - SocketRocket (0.7.0) - Yoga (0.0.0) @@ -1509,6 +1597,7 @@ DEPENDENCIES: - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) + - hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`) - RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCT-Folly/Fabric (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`) - RCTDeprecation (from `../node_modules/react-native/ReactApple/Libraries/RCTFoundation/RCTDeprecation`) @@ -1529,10 +1618,9 @@ DEPENDENCIES: - React-featureflags (from `../node_modules/react-native/ReactCommon/react/featureflags`) - React-featureflagsnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/featureflags`) - React-graphics (from `../node_modules/react-native/ReactCommon/react/renderer/graphics`) + - React-hermes (from `../node_modules/react-native/ReactCommon/hermes`) - React-idlecallbacksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks`) - React-ImageManager (from `../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios`) - - React-jsc (from `../node_modules/react-native/ReactCommon/jsc`) - - React-jsc/Fabric (from `../node_modules/react-native/ReactCommon/jsc`) - React-jserrorhandler (from `../node_modules/react-native/ReactCommon/jserrorhandler`) - React-jsi (from `../node_modules/react-native/ReactCommon/jsi`) - React-jsiexecutor (from `../node_modules/react-native/ReactCommon/jsiexecutor`) @@ -1542,6 +1630,7 @@ DEPENDENCIES: - React-Mapbuffer (from `../node_modules/react-native/ReactCommon`) - React-microtasksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`) - react-native-basis-universal (from `../..`) + - react-native-blob-util (from `../node_modules/react-native-blob-util`) - React-nativeconfig (from `../node_modules/react-native/ReactCommon`) - React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`) - React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`) @@ -1563,6 +1652,7 @@ DEPENDENCIES: - React-RuntimeApple (from `../node_modules/react-native/ReactCommon/react/runtime/platform/ios`) - React-RuntimeCore (from `../node_modules/react-native/ReactCommon/react/runtime`) - React-runtimeexecutor (from `../node_modules/react-native/ReactCommon/runtimeexecutor`) + - React-RuntimeHermes (from `../node_modules/react-native/ReactCommon/react/runtime`) - React-runtimescheduler (from `../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler`) - React-utils (from `../node_modules/react-native/ReactCommon/react/utils`) - ReactCodegen (from `build/generated/ios`) @@ -1570,6 +1660,8 @@ DEPENDENCIES: - "ReactNativeHost (from `../node_modules/@rnx-kit/react-native-host`)" - ReactTestApp-DevSupport (from `../node_modules/react-native-test-app`) - ReactTestApp-Resources (from `..`) + - Resources (from `./Resources`) + - "RNCPicker (from `../node_modules/@react-native-picker/picker`)" - Yoga (from `../node_modules/react-native/ReactCommon/yoga`) SPEC REPOS: @@ -1587,6 +1679,9 @@ EXTERNAL SOURCES: :podspec: "../node_modules/react-native/third-party-podspecs/fmt.podspec" glog: :podspec: "../node_modules/react-native/third-party-podspecs/glog.podspec" + hermes-engine: + :podspec: "../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec" + :tag: hermes-2024-08-15-RNv0.75.1-4b3bf912cc0f705b51b71ce1a5b8bd79b93a451b RCT-Folly: :podspec: "../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec" RCTDeprecation: @@ -1623,12 +1718,12 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/react/nativemodule/featureflags" React-graphics: :path: "../node_modules/react-native/ReactCommon/react/renderer/graphics" + React-hermes: + :path: "../node_modules/react-native/ReactCommon/hermes" React-idlecallbacksnativemodule: :path: "../node_modules/react-native/ReactCommon/react/nativemodule/idlecallbacks" React-ImageManager: :path: "../node_modules/react-native/ReactCommon/react/renderer/imagemanager/platform/ios" - React-jsc: - :path: "../node_modules/react-native/ReactCommon/jsc" React-jserrorhandler: :path: "../node_modules/react-native/ReactCommon/jserrorhandler" React-jsi: @@ -1647,6 +1742,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/react/nativemodule/microtasks" react-native-basis-universal: :path: "../.." + react-native-blob-util: + :path: "../node_modules/react-native-blob-util" React-nativeconfig: :path: "../node_modules/react-native/ReactCommon" React-NativeModulesApple: @@ -1689,6 +1786,8 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native/ReactCommon/react/runtime" React-runtimeexecutor: :path: "../node_modules/react-native/ReactCommon/runtimeexecutor" + React-RuntimeHermes: + :path: "../node_modules/react-native/ReactCommon/react/runtime" React-runtimescheduler: :path: "../node_modules/react-native/ReactCommon/react/renderer/runtimescheduler" React-utils: @@ -1703,6 +1802,10 @@ EXTERNAL SOURCES: :path: "../node_modules/react-native-test-app" ReactTestApp-Resources: :path: ".." + Resources: + :path: "./Resources" + RNCPicker: + :path: "../node_modules/@react-native-picker/picker" Yoga: :path: "../node_modules/react-native/ReactCommon/yoga" @@ -1712,45 +1815,47 @@ SPEC CHECKSUMS: FBLazyVector: 430e10366de01d1e3d57374500b1b150fe482e6d fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120 glog: 69ef571f3de08433d766d614c73a9838a06bf7eb + hermes-engine: ea92f60f37dba025e293cbe4b4a548fd26b610a0 RCT-Folly: 4464f4d875961fce86008d45f4ecf6cef6de0740 RCTDeprecation: 726d24248aeab6d7180dac71a936bbca6a994ed1 RCTRequired: a94e7febda6db0345d207e854323c37e3a31d93b RCTTypeSafety: 28e24a6e44f5cbf912c66dde6ab7e07d1059a205 React: c2830fa483b0334bda284e46a8579ebbe0c5447e React-callinvoker: 4aecde929540c26b841a4493f70ebf6016691eb8 - React-Core: 1e3c04337857fa7fb7559f73f6f29a2a83a84b9c + React-Core: 9c059899f00d46b5cec3ed79251f77d9c469553d React-CoreModules: 9fac2d31803c0ed03e4ddaa17f1481714f8633a5 - React-cxxreact: c72a7a8066fc4323ea85a3137de50c8a10a69794 + React-cxxreact: a979810a3ca4045ceb09407a17563046a7f71494 React-debug: 3d21f69d8def0656f8b8ec25c0f05954f4d862c5 - React-defaultsnativemodule: 95882787871a9e80337f464e4643f1c5e0a39198 - React-domnativemodule: dc8aac826a90479ca4e05f096f1f8cd35c216f31 - React-Fabric: 9347fa5c8fbfac6d5276dd9e52c91058467d0960 - React-FabricComponents: 68b9f8c4a7189c055a7eb67b182e8d98c4f75f47 - React-FabricImage: 062e20f8b360ca008f44d00a639951c8c37ba2aa + React-defaultsnativemodule: 5bb91842d2bd91c5e9d23f67f5913a1226e8d1f2 + React-domnativemodule: a8ff57705d8372d7182e9277110ad290d50ffeed + React-Fabric: 3bc7be9e3a6b7581fc828dc2aa041e107fc8ffb8 + React-FabricComponents: 668e0cb02344c2942e4c8921a643648faa6dc364 + React-FabricImage: 3f44dd25a2b020ed5215d4438a1bb1f3461cd4f1 React-featureflags: ee1abd6f71555604a36cda6476e3c502ca9a48e5 - React-featureflagsnativemodule: 209f660bc398849cfb81712c93010276f25f337b + React-featureflagsnativemodule: d91903b8ad0e82b1eee3e7845d08024fbd6c758f React-graphics: d7dd9c8d75cad5af19e19911fa370f78f2febd96 - React-idlecallbacksnativemodule: 17a0e379a7e3c9bc9653b6902f22f4208658d687 + React-hermes: 2069b08e965e48b7f8aa2c0ca0a2f383349ed55d + React-idlecallbacksnativemodule: 568f7db5c625852e3eac25a5686760da152f0225 React-ImageManager: ab7a7d17dd0ff1ef1d4e1e88197d1119da9957ce - React-jsc: 4d3352be620f3fe2272238298aaccc9323b01824 React-jserrorhandler: d9e867bb83b868472f3f7601883f0403b3e3942d - React-jsi: 490deef195fd3f01d57dc89dda8233a84bd54b83 - React-jsiexecutor: 13bcb5e11822b2a6b69dbb175a24a39e24a02312 - React-jsinspector: 5b93e72babcbfcbf84dd19576652c6b949d144af + React-jsi: d68f1d516e5120a510afe356647a6a1e1f98f2db + React-jsiexecutor: 6366a08a0fc01c9b65736f8deacd47c4a397912a + React-jsinspector: 0ac947411f0c73b34908800cc7a6a31d8f93e1a8 React-jsitracing: 0e8c0aadb1fcec6b1e4f2a66ee3b0da80f0f8615 React-logger: d79b704bf215af194f5213a6b7deec50ba8e6a9b React-Mapbuffer: b982d5bba94a8bc073bda48f0d27c9b28417fae3 - React-microtasksnativemodule: 8fa285fed833a04a754bf575f8ded65fc240b88d - react-native-basis-universal: 5a9b05e51cc23161be95911a7c442d0b204d189f + React-microtasksnativemodule: 2cec1d6e126598df0f165268afa231174dd1a611 + react-native-basis-universal: 228f3b3e396df77064173f7a26622d45e424964e + react-native-blob-util: e6a3b23a99ac2c3d9fa48722db049a1e1808efc2 React-nativeconfig: 8c83d992b9cc7d75b5abe262069eaeea4349f794 - React-NativeModulesApple: b8465afc883f5bf3fe8bac3767e394d581a5f123 + React-NativeModulesApple: 9f7920224a3b0c7d04d77990067ded14cee3c614 React-perflogger: 59e1a3182dca2cee7b9f1f7aab204018d46d1914 React-performancetimeline: a9d05533ff834c6aa1f532e05e571f3fd2e3c1ed React-RCTActionSheet: d80e68d3baa163e4012a47c1f42ddd8bcd9672cc React-RCTAnimation: bde981f6bd7f8493696564da9b3bd05721d3b3cc - React-RCTAppDelegate: e5865dbf46ddec6d9ed9310a05094d13f9bb043f - React-RCTBlob: e492d54533e61a81f2601494a6f393b3e15e33b9 - React-RCTFabric: e6ef266a60e885a0548b0f7a5e9737f42ccd596b + React-RCTAppDelegate: b21d50ec42f18fedae765629d56850538a8c98d7 + React-RCTBlob: 520a0382bf8e89b9153d60e3c6293e51615834e9 + React-RCTFabric: a083f6c78c6084a0ac332934fc5cfc4271bab61f React-RCTImage: 90448d2882464af6015ed57c98f463f8748be465 React-RCTLinking: 1bd95d0a704c271d21d758e0f0388cced768d77d React-RCTNetwork: 218af6e63eb9b47935cc5a775b7a1396cf10ff91 @@ -1760,19 +1865,22 @@ SPEC CHECKSUMS: React-rendererconsistency: f620c6e003e3c4593e6349d8242b8aeb3d4633f0 React-rendererdebug: e697680f4dd117becc5daf9ea9800067abcee91c React-rncore: c22bd84cc2f38947f0414fab6646db22ff4f80cd - React-RuntimeApple: 352013c169b30fd6a1c83acc39c16ac27fecf42e - React-RuntimeCore: 704ebf1cc6bc7f5b72da4a7740a4d1520c66bee5 + React-RuntimeApple: de0976836b90b484305638616898cbc665c67c13 + React-RuntimeCore: 3c4a5aa63d9e7a3c17b7fb23f32a72a8bcfccf57 React-runtimeexecutor: ea90d8e3a9e0f4326939858dafc6ab17c031a5d3 - React-runtimescheduler: 86b04703f6cb40f5d30a639a28aaee405032e75a - React-utils: 546831c4f1be57fac614f68de34ac8763e67db55 - ReactCodegen: 5d297fcaf283fac32424f6bed10aa8d733fd2e5a - ReactCommon: 8377a2a5504f72e284ce1b1cd207d8455bdbfdf3 - ReactNativeHost: a3cd2bc15b6deac7439318607ce5637d8a93a117 + React-RuntimeHermes: c6b0afdf1f493621214eeb6517fb859ce7b21b81 + React-runtimescheduler: 84f0d876d254bce6917a277b3930eb9bc29df6c7 + React-utils: cbe8b8b3d7b2ac282e018e46f0e7b25cdc87c5a0 + ReactCodegen: 4bcb34e6b5ebf6eef5cee34f55aa39991ea1c1f1 + ReactCommon: 6a952e50c2a4b694731d7682aaa6c79bc156e4ad + ReactNativeHost: a27bb5af1c4d73dd3e80cc7ce295407f414e0e8c ReactTestApp-DevSupport: ed439cce949caf074af3ae05051b4bd157ed4019 ReactTestApp-Resources: 7db90c026cccdf40cfa495705ad436ccc4d64154 + Resources: c7ed6b988f4b000c41b17a15017dd7f49766fd52 + RNCPicker: 6ad936eee086dbe2aeb658994021770b46897d62 SocketRocket: abac6f5de4d4d62d24e11868d7a2f427e0ef940d Yoga: 055f92ad73f8c8600a93f0e25ac0b2344c3b07e6 -PODFILE CHECKSUM: 0babb1258886e77c759ae1fbdd551ed484ead16e +PODFILE CHECKSUM: 88db05552cc61eb79b2fccb6f3e09940db6299a2 COCOAPODS: 1.15.2 diff --git a/example/ios/Resources/CandleGlass.exr b/example/ios/Resources/CandleGlass.exr new file mode 100644 index 0000000..55714cb Binary files /dev/null and b/example/ios/Resources/CandleGlass.exr differ diff --git a/example/ios/Resources/desk.exr b/example/ios/Resources/desk.exr new file mode 100644 index 0000000..d6ed392 Binary files /dev/null and b/example/ios/Resources/desk.exr differ diff --git a/example/ios/Resources/kodim01.png b/example/ios/Resources/kodim01.png new file mode 100644 index 0000000..d5a2c2a Binary files /dev/null and b/example/ios/Resources/kodim01.png differ diff --git a/example/ios/Resources/resources.podspec b/example/ios/Resources/resources.podspec new file mode 100644 index 0000000..42caefa --- /dev/null +++ b/example/ios/Resources/resources.podspec @@ -0,0 +1,10 @@ +Pod::Spec.new do |s| + s.name = 'Resources' + s.version = '0.0.1-dev' + s.author = { 'Oskar Kwaƛniewski' => 'oskarkwasniewski@icloud.com' } + s.license = 'MIT' + s.homepage = 'https://github.com/callstack/react-native-basis-universal' + s.source = { :git => 'https://github.com/callstack/react-native-basis-universal' } + s.summary = 'Resources for AwesomeApp' + s.resources = '*.{exr,png,ldr,basis}' +end diff --git a/example/node_modules/.generated/ios/ReactTestApp/desk.exr b/example/node_modules/.generated/ios/ReactTestApp/desk.exr new file mode 100644 index 0000000..d6ed392 Binary files /dev/null and b/example/node_modules/.generated/ios/ReactTestApp/desk.exr differ diff --git a/example/package.json b/example/package.json index b9a80be..e795fa8 100644 --- a/example/package.json +++ b/example/package.json @@ -11,8 +11,10 @@ "start": "react-native start" }, "dependencies": { + "@react-native-picker/picker": "^2.8.1", "react": "18.3.1", - "react-native": "0.75.4" + "react-native": "0.75.4", + "react-native-blob-util": "^0.19.11" }, "devDependencies": { "@babel/core": "^7.20.0", diff --git a/example/patches/react-native-blob-jsi-helper+0.3.1.patch b/example/patches/react-native-blob-jsi-helper+0.3.1.patch new file mode 100644 index 0000000..8347c50 --- /dev/null +++ b/example/patches/react-native-blob-jsi-helper+0.3.1.patch @@ -0,0 +1,15 @@ +diff --git a/node_modules/react-native-blob-jsi-helper/react-native-blob-jsi-helper.podspec b/node_modules/react-native-blob-jsi-helper/react-native-blob-jsi-helper.podspec +index 53ec31f..c47aba8 100644 +--- a/node_modules/react-native-blob-jsi-helper/react-native-blob-jsi-helper.podspec ++++ b/node_modules/react-native-blob-jsi-helper/react-native-blob-jsi-helper.podspec +@@ -15,6 +15,10 @@ Pod::Spec.new do |s| + + s.source_files = "ios/**/*.{h,m,mm}", "cpp/**/*.{h,cpp}" + ++ s.pod_target_xcconfig = { ++ "CLANG_CXX_LANGUAGE_STANDARD" => "c++17", ++ } ++ + s.dependency "React-Core" + s.dependency "React" + end diff --git a/example/src/App.tsx b/example/src/App.tsx index b3e2a30..59b4b24 100644 --- a/example/src/App.tsx +++ b/example/src/App.tsx @@ -1,46 +1,211 @@ -import React from 'react'; -import { StyleSheet, View, Button } from 'react-native'; +import { useEffect, useState } from 'react'; + +import { Picker } from '@react-native-picker/picker'; +import { + StyleSheet, + View, + Button, + Switch, + Text, + Image, + Alert, +} from 'react-native'; import { initializeBasis, BasisEncoder, } from '@callstack/react-native-basis-universal'; +import RNFetchBlob from 'react-native-blob-util'; + +function arrayBufferToBase64(buffer: Uint8Array): string { + let binary = ''; + let bytes = new Uint8Array(buffer); + let len = bytes.byteLength; + for (let i = 0; i < len; i++) { + binary += String.fromCharCode(bytes?.[i] ?? 0); + } + return btoa(binary); +} + +const BlobImage = ({ arrayBuffer }: { arrayBuffer?: Uint8Array | null }) => { + if (!arrayBuffer) { + return null; + } + + const base64 = arrayBufferToBase64(arrayBuffer); + + // Create data URI + const dataUri = `data:image/jpeg;base64,${base64}`; + + return ( + + ); +}; + +const BasisEncoderPlayground = () => { + const [image, setImage] = useState(null); + const [file, setFile] = useState('desk.exr'); + const [options, setOptions] = useState({ + uastc: false, + mipmaps: false, + srgb: false, + normalMap: false, + yFlip: false, + }); + + useEffect(() => { + const filePath = RNFetchBlob.fs.asset(file); + RNFetchBlob.fs.readFile(filePath, 'base64').then((data) => { + const byteCharacters = atob(data); + const byteNumbers = new Array(byteCharacters.length); + for (let i = 0; i < byteCharacters.length; i++) { + byteNumbers[i] = byteCharacters.charCodeAt(i); + } + const byteArray = new Uint8Array(byteNumbers); + setImage(byteArray); + }); + }, [file]); + + const toggleOption = (option: keyof typeof options) => { + setOptions((prevOptions) => ({ + ...prevOptions, + [option]: !prevOptions[option], + })); + }; + + const encode = async () => { + try { + if (!image) { + Alert.alert('No image to encode'); + return; + } + + initializeBasis(); + + const basisEncoder = new BasisEncoder(); + basisEncoder.setCreateKTX2File(true); + basisEncoder.setKTX2UASTCSupercompression(true); + basisEncoder.setKTX2SRGBTransferFunc(true); + + let useHDR = false; + + if (file.endsWith('.exr')) { + useHDR = true; + } + + if (useHDR) { + basisEncoder.setSliceSourceImageHDR(0, image, 0, 0, 3, true); + basisEncoder.setHDR(true); + } else { + basisEncoder.setSliceSourceImage(0, new Uint8Array(image), 0, 0, true); + } + + basisEncoder.setDebug(false); + basisEncoder.setComputeStats(false); + basisEncoder.setQualityLevel(255); + basisEncoder.setMipSRGB(true); + + if (options.uastc) { + basisEncoder.setPackUASTCFlags(2); + } else { + basisEncoder.setQualityLevel(128); + basisEncoder.setCompressionLevel(2); + } + + if (options.srgb) { + basisEncoder.setPerceptual(true); + basisEncoder.setMipSRGB(true); + } + + if (options.normalMap) { + basisEncoder.setNormalMap(); + basisEncoder.setMipRenormalize(true); + } + + if (options.yFlip) { + basisEncoder.setYFlip(true); + } + + basisEncoder.setMipGen(options.mipmaps); + + // Create a destination buffer to hold the compressed .basis file data. If this buffer isn't large enough compression will fail. + const ktx2FileData = new Uint8Array(1024 * 1024 * 24); + const t0 = performance.now(); + console.log( + 'basisFileData byteLength before: ', + ktx2FileData.buffer.byteLength + ); + const numOutputBytes = basisEncoder.encode(ktx2FileData); + const t1 = performance.now(); + + basisEncoder.delete(); + + console.log( + `Call to basisEncoder.encode took ${(t1 - t0) / 1000} seconds.` + ); + console.log('numOutputBytes', numOutputBytes); + + const actualKTX2FileData = new Uint8Array( + ktx2FileData.buffer, + 0, + numOutputBytes + ); + + const path = RNFetchBlob.fs.dirs.DocumentDir + '/output.ktx2'; + console.log(path); + + RNFetchBlob.fs.writeFile(path, Array.from(actualKTX2FileData), 'ascii'); + + console.log('actualKTX2FileData', actualKTX2FileData.buffer.byteLength); + } catch (error) { + console.error('Encoding failed:', error); + } + }; -export default function App() { return ( -