Features
Everything Zig EVM ships with.
A complete EVM execution core — engine, gas, parallelism, numerics, embedding and tooling — all in one MIT-licensed Zig codebase. See how it works for the data flow.
Core
Execution engine
Stack machine
A LIFO stack with 256-bit word elements and a 1024-item maximum depth, exactly as the EVM specifies.
96+ opcodes
Arithmetic, comparison and bitwise, stack (PUSH1–PUSH32, DUP1–DUP16, SWAP1–SWAP16, POP), memory, flow control, environmental and block-information opcodes.
Opcode registry
Each opcode is a separate file exporting getImpl(); dispatch is a HashMap lookup, so the instruction set is easy to read and extend.
Transaction lifecycle
Validation → opcode dispatch → gas consumption → stack/memory manipulation → state updates, matching the Ethereum execution flow.
Spec-accurate
Gas & correctness
Ethereum-matching gas
A 21,000-gas base transaction cost and per-opcode costs from getGasCost(), matching Ethereum specifications.
Dynamic memory gas
Memory-expansion gas is calculated dynamically as memory grows, with word-aligned 32-byte operations.
Out-of-gas protection
Gas is charged before each opcode executes, preventing expensive operations from running without sufficient gas.
Comprehensive tests
A test suite covers BigInt, opcodes, arithmetic, stack, memory and parallel execution.
5-6× throughput
Parallelism
Wave-based scheduling
Independent transactions are grouped into waves and executed concurrently based on address, balance and nonce conflict analysis.
O(n) dependency analysis
The optimized path uses hash-based dependency analysis — 10-100x faster than the naive O(n²) approach on large batches.
Work-stealing pool
A work-stealing thread pool with speculative execution and rollback keeps all cores busy, scaling linearly to 8 threads.
Memory pools
Arena allocators and memory pools reduce allocation overhead in the hot path.
256-bit
Numerics
BigInt system
256-bit integers built from 4×64-bit words with full arithmetic, comparison and bitwise operations.
EVM conversions
Conversion utilities keep BigInt values compatible with EVM word semantics.
FFI
Embedding
Python (ctypes)
Create EVM instances, load bytecode and execute transactions directly from Python via the C FFI.
Rust
Safe wrappers around the C ABI exports for idiomatic Rust integration.
JavaScript (N-API)
Node.js bindings via the zigevm npm package, supporting Node.js >= 14.0.0.
C header
A zigevm.h header exposes the C ABI functions exported from src/ffi.zig for direct integration.
Learn & debug
Tooling
Interactive playground
A browser-based bytecode editor with real-time disassembly, stack visualisation and execution tracing.
In-depth blog
Opcode references, gas guides, parallel-execution deep dives and implementation write-ups.
Static + Docker deploy
Ships as a static site on GitHub Pages plus a Docker container for the web demo.
Ready to run bytecode?
Try it in the browser, or embed it in your language of choice.