This document explains Traverse's feature flag system and the isolated build approach used to handle incompatible blockchain dependencies.
The Rust blockchain ecosystem has incompatible dependencies between different chains:
| Ecosystem | Library | k256 Version | secp256k1 Version |
|---|---|---|---|
| Ethereum (Alloy) | alloy-* |
^0.14 |
^0.29 |
| Solana | solana-sdk |
^0.13 |
^0.28 |
These version conflicts make it impossible to include both Ethereum and Solana support in the same binary.
Traverse uses separate Cargo workspaces for each blockchain ecosystem:
workspace-configs/
├── Cargo.toml.core # Core functionality only
├── Cargo.toml.ethereum # Ethereum + core
├── Cargo.toml.solana # Solana + core
├── Cargo.toml.cosmos # Cosmos + core
└── Cargo.lock.* # Locked dependencies per workspace
The Nix build system automatically:
- Selects the appropriate workspace configuration
- Resolves dependencies independently per ecosystem
- Ensures reproducible builds with checked-in lock files
- Prevents accidental mixing of incompatible dependencies
Standard library support with full functionality.
Use when: Building for desktop, server, or development environments.
Minimal build for embedded and circuit environments.
Use when: Building for ZK circuits or resource-constrained environments.
Essential functionality without heavy dependencies.
Use when: You need basic functionality with fast compilation.
Optimized for memory-constrained environments with fixed-size data structures.
Use when: Building for embedded systems or environments with strict memory limits.
WebAssembly-compatible build with browser support.
Use when: Building for web browsers or WASM runtimes.
Ethereum/EVM support with lightweight Alloy integration.
Includes:
- Solidity ABI parsing
- Storage layout compilation
- MPT proof verification
- Keccak256 hashing
Solana blockchain support.
Includes:
- Anchor IDL parsing
- Account layout compilation
- Borsh serialization
- SPL token support
Cosmos/CosmWasm support.
Includes:
- CosmWasm schema parsing
- ICS23 proof verification
- Cosmos storage patterns
HTTP clients for live blockchain data (requires std).
Minimal Alloy dependencies for faster compilation (Ethereum only).
Generate custom crates for specific storage layouts.
[dependencies]
traverse-core = { git = "https://github.com/timewave-computer/traverse", features = ["no-std"] }
traverse-valence = { git = "https://github.com/timewave-computer/traverse", features = ["constrained"] }[dependencies]
traverse-ethereum = { git = "https://github.com/timewave-computer/traverse", features = ["std"] }
traverse-core = { git = "https://github.com/timewave-computer/traverse" }[dependencies]
traverse-solana = { git = "https://github.com/timewave-computer/traverse", features = ["std"] }
traverse-core = { git = "https://github.com/timewave-computer/traverse" }nix build .#traverse-ethereum
nix build .#traverse-solana
nix build .#traverse-cosmosnix flake check # All ecosystems
nix build .#checks.$SYSTEM.traverse-ethereum-tests # Specific ecosystemnix develop .#ethereum # Ethereum development
nix develop .#solana # Solana development
nix develop .#cosmos # Cosmos developmentWhen using Cargo directly, you must manually ensure only one blockchain ecosystem is enabled:
# Ethereum only
cargo build --features ethereum
# Solana only (disable defaults)
cargo build --features solana --no-default-features
# Test specific ecosystem
cargo test --features ethereum --package traverse-ethereumCreate a flake.nix that builds separate binaries:
{
packages = {
ethereum-processor = traverse.packages.traverse-ethereum-cli;
solana-processor = traverse.packages.traverse-solana-cli;
};
}