Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle Format Spec #51

Closed
HazAT opened this issue Jul 18, 2019 · 1 comment
Closed

Bundle Format Spec #51

HazAT opened this issue Jul 18, 2019 · 1 comment
Labels
question Further information is requested

Comments

@HazAT
Copy link

HazAT commented Jul 18, 2019

Hello :)

I work for Sentry, we do crash reporting and therefore we are very interested in the bundle format / source maps.
We recently added support for ram bundles which had its own binary format and it seems that hermes has yet another format.

Can you point us towards some docs/specs/source so we can start implementing support for hermes bundles?

@mhorowitz
Copy link
Contributor

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.

@mhorowitz mhorowitz added the question Further information is requested label Jul 18, 2019
@HazAT HazAT closed this as completed Apr 13, 2020
facebook-github-bot pushed a commit that referenced this issue Mar 4, 2021
Summary:
It's all a little confusing but downstream consumers of Flipper
that don't use CMake themselves otherwise don't have access to these
libraries and will have them missing from their builds.

I'll create an 0.2.0 release for this so 0.1.0 consumers don't
end up with multiple binaries.

Pull Request resolved: facebookincubator/fbjni#51

Test Plan:
Tested locally with Flipper and a stand-alone example and it seems to
work.

Reviewed By: mweststrate

Differential Revision: D26815786

Pulled By: passy

fbshipit-source-id: c70b56952acbe6e3be4ef74da2e4115651ce8e9c
mganandraj added a commit to mganandraj/hermes that referenced this issue Nov 29, 2021
* FastDebug build flavor and HermesNoLink msbuild flag

* Bumping hermes package version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants