GithubHelp home page GithubHelp logo

Bundle Format Spec about hermes HOT 1 CLOSED

facebook avatar facebook commented on April 24, 2024 14
Bundle Format Spec

from hermes.

Comments (1)

mhorowitz avatar mhorowitz commented on April 24, 2024 1

Hi! There aren't docs, but I can point you to some source code to get you started. First, I should point out that the bytecode file format is not intended to be fixed long-term. We update it pretty often, so you should expect to need regular incremental changes.

The overall format of the bytecode file is defined in the serializer/deserializer code. It's driven by a visitor here. This header defines a magic number and the bytecode version, which your tool can use to recognize Hermes bytecode files, and the specific format of each file. The implementations are in BytecodeStream.cpp. The bytecodes themselves are defined in BytecodeList.def.

We also have some tooling to dump bytecode files which might help. If you have a bytecode file, you can run

bin/hermes -dump-bytecode myfile.hbc

to see various data about the file. This was intended for humans, not automated systems, so I wouldn't depend on parsing the output, but it might help you writing your own tool.

The source maps are in the conventional format; we're not doing anything special there.

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.