Docs
Building from Source
Compile the Omni agent, runtime, and CLI from source. Useful for contributors, custom builds, and running on architectures without pre-built binaries.
Prerequisites
1.78+curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup target add wasm32-wasip1
20+Required for the WhatsApp Baileys sidecar
3.35+apt install libsqlite3-dev (Linux) / brew install sqlite (macOS)
1.1+apt install libssl-dev pkg-config (Linux) / brew install openssl (macOS)
Clone & Build
# Clone the repository
git clone https://github.com/omniai/omni.git
cd omni
# Build all crates in release mode
cargo build --release
# Binary location
./target/release/omni --version
A full release build takes 3-5 minutes on a modern machine. Debug builds are faster but produce significantly larger binaries.
Crate Structure
Omni is a Cargo workspace with seven crates. Each can be built and tested independently.
omni-coreAgent loop, event bus, configuration, and database layer
omni-channelsAll 21+ messaging platform integrations
omni-runtimeWASM extension runtime with Wasmtime, host functions, and sandbox enforcement
omni-guardianAnti-injection pipeline and capability-based permission system
omni-tools29 built-in native tools (exec, file, web, memory, git, testing, debugging, REPL, etc.)
omni-cliCLI binary, extension publishing commands, and config migration
omni-sdkGuest-side SDK crate for building WASM extensions
Platform-Specific Notes
Windows
- -Install Visual Studio Build Tools 2022 with the “Desktop development with C++” workload
- -Use
vcpkgto install OpenSSL:vcpkg install openssl:x64-windows - -Set
OPENSSL_DIRandOPENSSL_LIB_DIRenvironment variables
macOS
- -Xcode Command Line Tools required:
xcode-select --install - -Apple Silicon (M1/M2/M3) is natively supported — builds produce arm64 binaries
Linux
sudo apt update
sudo apt install build-essential pkg-config \
libssl-dev libsqlite3-dev
Running Tests
# Run the full test suite
cargo test --workspace
# Run tests for a specific crate
cargo test -p omni-runtime
# Run with logging output
RUST_LOG=debug cargo test --workspace -- --nocapture
Integration tests for channel crates require environment variables for bot tokens. See .env.example for the full list.
Development Workflow
Watch mode
Use cargo watch -x run to auto-rebuild on file changes. Install with cargo install cargo-watch.
Check before committing
Run cargo clippy --workspace -- -D warnings and cargo fmt --check to match CI lint rules.
Build extensions locally
Use cargo build --target wasm32-wasip1 --release in your extension crate, then omni ext install --path ./target/...
Debug logging
Set RUST_LOG=omni_core=debug,omni_runtime=trace for granular runtime output.