Skip to main content
Voltaire separates high-level language ergonomics from low-level execution. Ethereum primitives, EVM precompiles, and cryptographic kernels live in Zig, Rust, and C, while TypeScript and language bindings expose typed, idiomatic APIs over the same underlying semantics.

Zig Module Graph

build.zig registers explicit Zig modules so every cross-module import is checked by the build graph: Always import via registered module names, never relative paths across package boundaries:

Runtime Execution Paths in @tevm/voltaire

@tevm/voltaire ships three entrypoints conforming to the same VoltaireAPI interface:

Platform Matrix

Design Invariants

  1. Zero-cost nominal types. In TypeScript, AddressType, HashType, HexType, and Uint256Type are branded Uint8Array or string types enforced strictly at compile time.
  2. Validate on construction. Constructors (Address.from, Hash.fromHex, Hex.from) reject malformed lengths, invalid hex digits, or out-of-range values immediately with typed error classes from @tevm/voltaire/errors.
  3. Explicit Zig allocators. No global hidden heap allocations. Functions needing dynamic buffers accept allocator: std.mem.Allocator and transfer ownership to the caller.
  4. Single C ABI surface. packages/voltaire-zig/src/c_api.zig defines the exported C symbols and generates primitives.h, which feeds Bun FFI, Swift (CVoltaire), Go (CGo), Python, and C consumers from one source of truth.