Skip to main content

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

Run zig build && zig build test constantly. Know immediately when something breaks.

Data-First Design

Primitives are branded Uint8Arrays with namespace methods. Zero runtime overhead, full type safety.

Module Overview

Import Rules

Always use module imports, never relative paths.

File Colocation

Each primitive lives in a single folder with paired implementations:

Essential Commands

Getting Help