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

How To Assemble? #8

Open
scriptxd opened this issue Feb 20, 2024 · 1 comment
Open

How To Assemble? #8

scriptxd opened this issue Feb 20, 2024 · 1 comment

Comments

@scriptxd
Copy link

There's No Option To Re Assemble & Recompiler
Fix This

Tried hbctool to reassemble

Error:
assert os.path.exists(f"{path}/metadata.json"), f"metadata.json not found."
AssertionError: metadata.json not found

@devnoname120
Copy link

devnoname120 commented Aug 10, 2024

Did you try the official assembler? https://github.com/facebook/hermes/tree/14248a5d75bec91f0053d0bad54b915b49c97342/tools/hermesc

hermesc -emit-binary -out myfile.hbc myfile.js

You can find the right version of the code for your HBC bytecode version in this file, just look back in history:
https://github.com/facebook/hermes/blame/main/include/hermes/BCGen/HBC/BytecodeVersion.h#L23

You can then compile the whole hermes repo for the commit with the correct HBC bytecode version using the instructions from the README.md and use the resulting hermesc tool that is built among the other stuff.


Edit — Or you can use the following tool in order to compile all the possible HBC bytecode CLI versions easily: https://github.com/lucasbaizer2/hasmer/tree/master/autogenerators

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants