Need help with hera?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

145 Stars 42 Forks Apache License 2.0 1.1K Commits 32 Opened issues


Hera: Ewasm virtual machine conforming to the EVMC API

Services available


Need anything else?

Contributors list

Hera Status

Hera is an ewasm virtual machine implemented in C++ conforming to EVMC ABIv9.

It is designed to leverage various Wasm backends, both interpreters and AOT/JITs.

Client support

Hera has been tested with aleth and geth. It should however work with any client with compliant EVMC support.

Building Hera

First clone this repository and make sure the submodules are checked out:

$ git clone
$ cd hera
$ git submodule update --init

The preferred way is building Hera as a shared library:

$ mkdir build
$ cd build
$ cmake --build .

In this case the built library will be placed at

on Linux or
on MacOS.

Please also check the build options listed in the following section.

Build options

    will turn on debugging features and messages. This is off by default.
    is a standard CMake option to build libraries as shared. This will build Hera shared library that can be then dynamically loaded by EVMC compatible Clients (e.g.
    from aleth). This is the preferred way of compilation.

wabt support

Complete support.

wabt is built by default and needs no build options. It can be disabled with:


Binaryen support

Complete support.

Binaryen support needs to be enabled via the following build option and requested at runtime with

    will request the compilation of Binaryen support

WAVM support

Complete support.

WAVM support needs to be enabled via the following build option and requested at runtime with

    will request the compilation of WAVM support
  • -DLLVM_DIR=...
    one will need to specify the path to LLVM's CMake file. In most installations this has to be within the
    directory, such as
    on Homebrew.

Runtime options

These are to be used via EVMC

  • engine=
    will select the underlying WebAssembly engine, where the only accepted values currently are
    , and
  • metering=true
    will enable metering of bytecode at deployment using the Sentinel system contract
  • benchmark=true
    will produce execution timings and output it to both standard error output and
  • evm1mode=
    will select how EVM1 bytecode is handled
  • sys:=file.wasm
    will override the code executing at the specified address with code loaded from a filepath at runtime. This option supports aliases for system contracts as well, such that
    are both valid. This option is intended for debugging purposes.


  • reject
    will reject any EVM1 bytecode with an error (the default setting)
  • fallback
    will allow EVM1 bytecode to be passed through to the client for execution
  • evm2wasm
    will enable transformation of bytecode using the EVM Transcompiler
  • runevm
    will transform EVM1 bytecode using runevm


Hera implements two interfaces: EEI and a debugging module.

Debugging module

  • debug::print32(value: i32)
    - print value
  • debug::print64(value: i64)
    - print value
  • debug::printMem(offset: i32, len: i32)
    - print memory segment as printable characters
  • debug::printMemHex(offset: i32, len: i32)
    - print memory segment as hex
  • debug::printStorage(pathOffset: i32)
    - print storage value as printable characters
  • debug::printStorageHex(pathOffset: i32)
    - print storage value as hex

These are only enabled if Hera is compiled with debugging on.

EVM Tracing

  • debug::evmTrace(pc: i32, opcode: i32, cost: i32, sp: i32)

This is useful to trace the translated code by EVM Transcompiler. This is only enabled if Hera is compiled with debugging on.

Note: it is valid to invoke

with a negative value for
. In this case, no stack values will be printed.


To enable fuzzing you need clang compiler and provide

option to CMake. You should also enable both Binaryen and WABT engines. This will build additional executable
. Check out its help and libFuzzer documentation.
test/fuzzing/hera-fuzzer -help=1


  • Alex Beregszaszi
  • Jake Lang


Apache 2.0

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.