GithubHelp home page GithubHelp logo

Interaction with CodePush about hermes HOT 4 CLOSED

facebook avatar facebook commented on April 27, 2024 20
Interaction with CodePush

from hermes.

Comments (4)

willholen avatar willholen commented on April 27, 2024 12

We don't currently have an official strategy or integration with Code Push. However, nothing stops you from pushing your own pre-compiled bytecode files -- they essentially correspond 1:1 to JavaScript bundle files and can be loaded and managed in much the same way.

When given a file, Hermes will examine the header to determine whether it's JS or bytecode and load it accordingly, so you don't have to change anything about how the file is loaded or even which extension it has.

There is one significant caveat though: a bundle compiled with one version of Hermes will not run on a different version.

To maximize efficiency and productivity, we don't try to maintain forward or backward compatibility between versions. If you want to decouple app and code releases through code pushes, you should either stick to a specific version of Hermes, or have a strategy for pushing different bytecode to each applicable Hermes version.

(Specifically, the compiler encodes a bytecode version number in the bundle that the engine verifies on load).

None of this applies to standard apps that just include their bytecode in the APK. In this case you're free to upgrade Hermes at any time since the bytecode will always be compiled with the relevant version.

from hermes.

eggli avatar eggli commented on April 27, 2024 4

Just a head up, I've created a PR to add Hermes support on CodePush CLI here, feel free to comment:

microsoft/appcenter-cli#627

from hermes.

kaushikwavhal avatar kaushikwavhal commented on April 27, 2024 2

IMO, it should be. OTA is one of the USP of RN. And as far as i now, OTA bundle is essentially a zip file, so it can contain image assets and bytecode file.

from hermes.

kaushikwavhal avatar kaushikwavhal commented on April 27, 2024 1

@willholen Thanks for the update.
As i understand, An Hermes version upgrade can be treated in the same we as we treat a React-Native version upgrade in OTA. Backward and forward compatibility can work for the app versions which don't involve any change on the native side (Hermes or RN ).

from hermes.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.