Repository navigation
v0.1.0 - First Release
π First Release: v0.1.0
This is the first official release of primitives - Ethereum primitives and cryptographic operations for Zig.
π¦ Installation
You can now install this package using zig fetch:
# Install specific version (recommended)
zig fetch --save https://github.com/evmts/primitives/archive/refs/tags/v0.1.0.tar.gz
# Install latest from main branch
zig fetch --save git+https://github.com/evmts/primitivesπ Usage
After fetching, add to your build.zig:
const primitives = b.dependency("guillotine_primitives", .{
.target = target,
.optimize = optimize,
});
// Add the modules you need:
exe.root_module.addImport("primitives", primitives.module("primitives"));
exe.root_module.addImport("crypto", primitives.module("crypto"));
exe.root_module.addImport("precompiles", primitives.module("precompiles"));π§ Features
Primitives Module
- uint256: 256-bit unsigned integers for Ethereum
- Address: Ethereum address type with validation
- Hex: Hex encoding/decoding utilities
- RLP: Recursive Length Prefix encoding/decoding
- ABI: Ethereum ABI encoding/decoding
- Transactions: Ethereum transaction types and operations
- Logs: Ethereum event log handling
Crypto Module
- Keccak-256: Ethereum's hashing algorithm
- secp256k1: ECDSA signature operations
- BLS12-381: BLS signature operations (via blst)
- BN254: Elliptic curve operations for zkSNARKs
- KZG: KZG commitments (EIP-4844)
- SHA256, RIPEMD160, Blake2: Additional hash functions
Precompiles Module
- EIP-152: Blake2 compression function
- EIP-196/197: BN254 elliptic curve operations
- EIP-4844: KZG point evaluation
β οΈ Important Notes
- Mission-critical cryptographic infrastructure - reviewed but use at your own risk
- Requires Zig 0.15.1 or later
- Some crypto implementations are marked as "unaudited" - use production-audited alternatives where available
π Documentation
See the README for detailed documentation and examples.
π€ Generated with Claude Code
Note: This action was performed by Claude AI assistant, not @roninjin10 or @fucory