Developer Documentation
Everything you need to understand and contribute to Voltaire.Quick Start
Documentation Structure
Architecture
Module structure, import rules, colocated files
TypeScript Patterns
Branded types, namespace exports, dual APIs
Zig Patterns
Style guide, memory management, inline tests
Build System
zig build commands, bun scripts, outputs
Testing
Test organization, commands, TDD workflow
Adding Primitives
Step-by-step guide to add new primitive types
Adding Crypto
How to add cryptographic functions
WASM
WASM compilation, modes, and integration
Multi-Language
TypeScript, Zig, Rust, C integration
Key Principles
Every Line Correct
No stubs, no commented tests, no placeholders. Code is complete or it doesn’t exist.WIP Status
Library not yet released. No breaking changes concept - refactor freely.TDD Workflow
Runzig build && zig build test constantly. Know immediately when something breaks.
Data-First Design
Primitives are brandedUint8Arrays with namespace methods. Zero runtime overhead, full type safety.
Module Overview
| Module | Purpose | Languages |
|---|---|---|
primitives/ | Ethereum types (Address, Hash, Uint, RLP, ABI, Transaction) | TS + Zig |
crypto/ | Cryptography (Keccak, secp256k1, BLS12-381, BN254, KZG) | TS + Zig + Rust + C |
evm/precompiles/ | EVM precompile implementations (21 total) | Zig |
wasm-loader/ | WASM instantiation and memory management | TS |
lib/ | C libraries (blst, c-kzg-4844, libwally-core) | C |
Import Rules
File Colocation
Each primitive lives in a single folder with paired implementations:Essential Commands
Getting Help
- Check inline comments in source files
- Read test files for usage examples
- Reference the Yellow Paper and EIPs for spec details
- Zig docs: https://ziglang.org/documentation/0.15.1/

