Installation Guide
Minichain is written entirely in Rust and requires Rust 1.70 or later. This guide will walk you through installing Rust and building Minichain from source.Prerequisites
Install Rust
Minichain requires Rust 1.70+. If you don’t have Rust installed, userustup:
If
rustc is not found, restart your terminal or run:System Requirements
Minichain has minimal system requirements:- OS: Linux, macOS, or Windows
- RAM: 512MB minimum
- Disk: 50MB for the binary + space for blockchain data
- CPU: Any modern processor
Build from Source
Clone the Repository
Clone the Minichain repository from GitHub:
Replace the repository URL with your fork if you’re contributing to Minichain.
Build the Project
Build the project in release mode for optimal performance:This will:
- Download and compile all dependencies
- Compile all 7 crates in the workspace
- Create an optimized binary
- Take 2-5 minutes depending on your system
Verify Installation
Test that Minichain is working correctly:Development Setup
If you plan to contribute or modify Minichain, here are useful development tools:Run Tests
Minichain includes 26+ unit and integration tests:Code Quality Tools
Watch Mode
Installcargo-watch for automatic rebuilds:
Project Structure
Once built, your workspace contains:Workspace Dependencies
Minichain uses the following key dependencies:Cryptography
- blake3 (1.5): Fast hashing for blocks and transactions
- ed25519-dalek (2.1): Digital signatures for transaction signing
- rand (0.8): Cryptographic randomness for key generation
Storage
- sled (0.34): Embedded database for persistent blockchain state
Serialization
- serde (1.0): Serialization framework
- serde_json (1.0): JSON serialization for configuration
- bincode (1.3): Binary serialization for blockchain data
CLI
- clap (4.4): Command-line argument parsing
- colored (2.1): Terminal color output
Utilities
- thiserror (1.0): Error handling
- anyhow (1.0): Error context
- hex (0.4): Hexadecimal encoding/decoding
- chrono (0.4): Timestamp handling
Assembler
- logos (0.14): Lexer generator for assembly language
Logging
- tracing (0.1): Structured logging
- tracing-subscriber (0.3): Log output formatting
Cargo.toml and automatically downloaded during build.
Troubleshooting
Compilation Errors
Issue:error: linker 'cc' not found
Outdated Rust Version
Issue:error: package requires rustc 1.70 or newer
Cargo Command Not Found
Issue:bash: cargo: command not found
Restart your terminal or manually add to PATH:
Build Takes Too Long
Issue: First build is slow (5+ minutes) This is normal! Subsequent builds are much faster due to caching. Usecargo build (without --release) for faster debug builds during development.
Disk Space Issues
Issue:error: no space left on device
Clean old build artifacts:
Next Steps
Now that Minichain is installed:- Run the Quickstart: Follow the Quickstart Guide to initialize your first blockchain
- Learn the Basics: Read Core Concepts to understand the architecture
- Write Contracts: Study the Assembly Language guide
Quickstart
Get your blockchain running in 5 minutes
Core Concepts
Learn about accounts, transactions, and blocks