Documentation Index
Fetch the complete documentation index at: https://mintlify.com/nearai/ironclaw/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before building IronClaw, ensure you have the following installed:Required
-
Rust 1.85+: Install via rustup
-
WASM target: Required for building bundled channels
-
wasm-tools: Required for WASM component model
Database Options
Choose one or both:PostgreSQL (Recommended for Production)
-
PostgreSQL 15+ with pgvector extension
libSQL (For Development)
- No installation needed - embedded database included
- Perfect for development and testing
- Zero-dependency local mode
Quick Setup
The fastest way to get started:- Verifies rustup installation
- Adds the
wasm32-wasip2target - Installs
wasm-tools - Runs
cargo checkto verify compilation - Runs tests using libSQL (no external database needed)
Manual Build Process
1. Clone the Repository
2. Development Build
Build with default features (PostgreSQL + libSQL):target/debug/ironclaw.
3. Release Build
Build optimized binary:target/release/ironclaw.
4. Run the Binary
Build Features
IronClaw supports multiple feature flags for different configurations.Default Features
postgres: PostgreSQL database supportlibsql: Embedded database supporthtml-to-markdown: HTML content conversion
PostgreSQL Only
libSQL Only (Embedded)
All Features
Building WASM Channels
IronClaw bundles WASM channels directly into the binary. After modifying channel source code, rebuild them:Build Specific Channel
Build All Channels
Use the convenience script:- Builds all bundled channels in
channels-src/ - Builds IronClaw with
--release - Outputs binary to
target/release/ironclaw
Build Configuration
Cargo.toml Overview
Key configuration fromCargo.toml:
Build Profiles
Development (default)
- Fast compilation
- Debug symbols included
- No optimizations
Release
- Full optimizations
- Stripped debug symbols
- Slower compilation
Distribution
- Used by
cargo-distfor releases - Thin LTO for smaller binaries
- Inherits from release profile
Platform-Specific Builds
macOS
Linux
Windows
Cross-Compilation
For cross-compilation, use cross:Troubleshooting
Missing wasm32-wasip2 Target
Error:error: can't find target wasm32-wasip2
Solution:
wasm-tools Not Found
Error: Build script fails with “wasm-tools not found” Solution:PostgreSQL Connection Failed
Error:could not connect to server
Solution:
pgvector Extension Missing
Error:extension "vector" is not available
Solution:
OpenSSL Errors (Linux)
Error:could not find system library 'openssl'
Solution:
Compilation Memory Issues
Error: Compiler runs out of memory Solution:Linker Errors on macOS
Error:ld: library not found
Solution:
Build Scripts
IronClaw includes convenience scripts for common build tasks:dev-setup.sh
Complete development environment setup:- Checks dependencies
- Adds WASM targets
- Installs wasm-tools
- Runs initial build and tests
build-all.sh
Full release build with channels:- Builds all WASM channels
- Builds IronClaw with
--release - Outputs to
target/release/ironclaw
Build Time Optimization
Use Cargo Cache
Incremental Compilation
Enabled by default for debug builds:Parallel Builds
Maximize CPU usage:Verifying Your Build
Check Version
Run Tests
Run the REPL
Next Steps
After building successfully:- Configure IronClaw: Run
ironclaw onboardfor setup wizard - Run Tests: See Running Tests
- Start Contributing: Read Contributing Guide
- Check Feature Parity: Review Feature Parity