Ethereum Virtual Machine (EVM) implemented in Zig – just the EVM.
zevem is primarily designed to be embedded into a host Ethereum client as a library but also plans to incorporate various developer-focused features like:
- Bytecode debugger (with worldstate via EVMC if not library).
- Bytecode (dis)assembler.
- Solidity decompiler (NOTE: Extremely “maybe” since this will also require deep knowledge of how the Solidity compiler and it’s various versions likes to compile things etc).
Pre-alpha work-in-progress. Currently only concerned about use within Phant as the first host client (and therefore real-world proof of zevem’s correct implementation etc). Contributions and ideation of course welcome (open an issue or contact via email for discussion beforehand please).
See zevem’s project planning file for TODOs, further resources etc.
The only real dependency is Zig 0.14.0
, everything is developer tooling.
A justfile (see: Just) provides simpler access to common project commands. Execute just
anywhere within this project repo to see a list of available commands, common ones are:
To build:
just build
To run all tests:
just test
The justfile is configured (by default) to echo the commands it executes; it’s syntax is very readable however and is mostly a convenient alias for various Zig build-system commands.
The .jam
directory includes a Containerfile
(aka. Dockerfile
) for container-based workflows. It is primarily written for use with Podman but should also work with Docker. It is currently written for macOS hosts running containers; i.e. an implicit Linux-VM which itself is actually managing containers.
The jam
file (shell-script) at the repository root can be used to build/create/run development containers. These are not based on “Development Containers” from Micro$oft as that specification, amongst others, are JSON-plagued overly complicated hellscapes.
To build a container image with all zevem dependencies including extra utilities for general debugging:
./jam make
To create and run the built container image, replacing any that may exist:
./jam run
This repo’s files are bind-mounted into the container at /home/jammy/project
so no work is lost when deleting/re-building/re-creating (etc) the container so long as you stick within that bind-mounted directory.