Overview
Building Ubu-Block from source gives you the flexibility to customize the platform and stay up-to-date with the latest development changes. This guide walks you through the entire build process.If you prefer to use pre-built binaries, download them from the releases page and skip to the Configuration guide.
Prerequisites
Before building, ensure you have:- Met all system requirements
- Installed the Rust toolchain (edition 2024)
- Installed required system libraries
- Git installed for cloning the repository
Cloning the Repository
Verify the workspace structure
Ubu-Block uses a Cargo workspace with multiple members:You should see:
apps/- CLI, API, and web applicationsnodes/- Observer, submission, and verification node implementationscrates/- Core libraries (blockchain, database, types)Cargo.toml- Workspace configuration
Building the Project
Full Workspace Build
Build all workspace members
Build the entire workspace including all nodes and applications:The compiled binaries will be located in
The
--release flag enables optimizations. Build time may take 5-15 minutes depending on your hardware.target/release/.Building Specific Components
You can build individual components instead of the entire workspace:- CLI Application
- Observer Node
- Submission Node
- Verification Node
Development Builds
For development and testing, you can use unoptimized builds:- Compile much faster (1-3 minutes)
- Include debug symbols
- Have reduced performance
- Are located in
target/debug/
Testing the Build
Run the test suite
Execute all tests to verify the build:This runs unit tests for all workspace members.
Installing System-Wide
Optionally, install the binaries to your system path:Build Troubleshooting
OpenSSL/TLS errors during build
OpenSSL/TLS errors during build
If you encounter OpenSSL-related errors:On Ubuntu/Debian:On macOS:On Windows:
Consider using the
rustls feature instead of OpenSSL.SQLite linking errors
SQLite linking errors
If SQLite fails to link:On Ubuntu/Debian:On macOS:
Out of memory during compilation
Out of memory during compilation
If the build runs out of memory:
- Use
cargo build --release -j 1to limit parallel jobs - Close other applications to free memory
- Add swap space if running on a low-memory system
Rust edition not supported
Rust edition not supported
If you see errors about edition 2024:
Edition 2024 requires Rust 1.85+. Update your toolchain if needed.
Build Configuration
Optimizing Build Performance
Speed up compilation with these optional configurations in~/.cargo/config.toml:
Cross-Compilation
To build for a different target architecture:Updating the Build
To update to the latest version:Next Steps
Configuration
Configure your node after building
Running Nodes
Learn how to run different node types