Skip to main content
Hedis supports 30 Hermes bytecode versions ranging from v61 to v96, covering Hermes releases from v0.1.0 through v0.14.0+. Each version has pre-generated opcode definitions that enable accurate disassembly and analysis.

Supported Versions

The following table lists all bytecode versions with their corresponding opcode packages:
Bytecode VersionPackage LocationStatus
v61pkg/hbc/types/opcodes/bcv61Supported
v63pkg/hbc/types/opcodes/bcv63Supported
v64pkg/hbc/types/opcodes/bcv64Supported
v65pkg/hbc/types/opcodes/bcv65Supported
v66pkg/hbc/types/opcodes/bcv66Supported
v67pkg/hbc/types/opcodes/bcv67Supported
v68pkg/hbc/types/opcodes/bcv68Supported
v69pkg/hbc/types/opcodes/bcv69Supported
v70pkg/hbc/types/opcodes/bcv70Supported
v72pkg/hbc/types/opcodes/bcv72Supported
v73pkg/hbc/types/opcodes/bcv73Supported
v75pkg/hbc/types/opcodes/bcv75Supported
v77pkg/hbc/types/opcodes/bcv77Supported
v78pkg/hbc/types/opcodes/bcv78Supported
v79pkg/hbc/types/opcodes/bcv79Supported
v80pkg/hbc/types/opcodes/bcv80Supported
v81pkg/hbc/types/opcodes/bcv81Supported
v82pkg/hbc/types/opcodes/bcv82Supported
v84pkg/hbc/types/opcodes/bcv84Registered Parser
v85pkg/hbc/types/opcodes/bcv85Registered Parser
v86pkg/hbc/types/opcodes/bcv86Supported
v87pkg/hbc/types/opcodes/bcv87Supported
v88pkg/hbc/types/opcodes/bcv88Supported
v89pkg/hbc/types/opcodes/bcv89Registered Parser
v90pkg/hbc/types/opcodes/bcv90Registered Parser
v91pkg/hbc/types/opcodes/bcv91Supported
v92pkg/hbc/types/opcodes/bcv92Supported
v94pkg/hbc/types/opcodes/bcv94Registered Parser
v95pkg/hbc/types/opcodes/bcv95Supported
v96pkg/hbc/types/opcodes/bcv96Registered Parser

Version Detection

When Hedis encounters an HBC file, it reads the bytecode version from the file header and selects the appropriate parser using GetParser() in pkg/hbc/bytecode_parser.go:243.

Parser Fallback Strategy

Not every bytecode version requires its own parser entry. Hedis uses a fallback strategy:
  • The parser selects the highest registered version that does not exceed the file’s bytecode version
  • For example, a v92 file will use the v90 parser if v92 is not explicitly registered
  • Only versions that introduce meaningful instruction set changes need their own entry

Registered Parsers

Currently registered parser versions (defined in parserModuleTable):
parserModuleTable := map[int]*ParserModule{
    84: {bcv84.OpcodeToInstruction, bcv84.NameToInstruction, bcv84.BuiltinFunctionNames},
    85: {bcv85.OpcodeToInstruction, bcv85.NameToInstruction, bcv85.BuiltinFunctionNames},
    89: {bcv89.OpcodeToInstruction, bcv89.NameToInstruction, bcv89.BuiltinFunctionNames},
    90: {bcv90.OpcodeToInstruction, bcv90.NameToInstruction, bcv90.BuiltinFunctionNames},
    94: {bcv94.OpcodeToInstruction, bcv94.NameToInstruction, bcv94.BuiltinFunctionNames},
    96: {bcv96.OpcodeToInstruction, bcv96.NameToInstruction, bcv96.BuiltinFunctionNames},
}

Version Warnings

Hedis logs warnings for unsupported or future bytecode versions:
Ancient Format
warning
Files with bytecode version < 72 will trigger a warning:
Warning: This file uses an ancient Hermes bytecode format, which is not supported [XX].
Future Format
warning
Files with bytecode version > 96 will trigger a warning:
Warning: This file uses a future Hermes bytecode format, which is not yet supported [XX].

File Format

All Hermes bytecode files begin with the magic number:
0x1F1903C103BC1FC6
The bytecode version immediately follows the magic number in the file header.

Adding New Versions

To add support for a new bytecode version, see Contributing.

Build docs developers (and LLMs) love