Building Rust Core
This page is a contributor-facing reference for compiling the Rust core on a fresh machine.
It only covers the repo root crate:
- Cargo package:
openhuman - Binary:
openhuman-core - Library:
openhuman_core
If you want the full desktop app (pnpm dev, Tauri, CEF, frontend tooling), use Getting Set Up. That path has extra JavaScript, submodules, and desktop runtime requirements that are not needed for pure core cargo workflows.
1. Install the Pinned Rust Toolchain
The repo pins Rust in rust-toolchain.toml:
- Channel:
1.93.0 - Components:
rustfmt,clippy
Recommended install:
rustup toolchain install 1.93.0 --component rustfmt --component clippy
rustup default 1.93.0
2. Clone the Repo
For core-only work:
git clone https://github.com/tinyhumansai/openhuman.git
cd openhuman
For core-only work you only need the repo root crate. Desktop/Tauri work needs the app/src-tauri/vendor/ submodule.
3. Build Commands
From the repo root:
# Quick dependency + type check
cargo check --manifest-path Cargo.toml
# Debug build
cargo build --manifest-path Cargo.toml --bin openhuman-core
# Release build
cargo build --manifest-path Cargo.toml --release --bin openhuman-core
# Rust tests
cargo test --manifest-path Cargo.toml
Note:
- The package name is
openhuman, but the runnable binary isopenhuman-core - Built binary is at
target/debug/openhuman-coreortarget/release/openhuman-core
4. macOS Prerequisites
Install:
- Xcode Command Line Tools:
xcode-select --install
Why:
whisper-rscompiles native code during build- On macOS, this crate builds with the
metalfeature so Apple toolchain and SDK headers are needed
5. Linux Prerequisites
Core-Only Package Set
Ubuntu / Debian:
sudo apt-get update
sudo apt-get install -y \
build-essential cmake pkg-config clang libssl-dev libclang-dev \
libasound2-dev libxi-dev libxtst-dev libxdo-dev libudev-dev \
libstdc++-14-dev
Arch Linux:
sudo pacman -S --needed base-devel cmake pkgconf clang openssl \
alsa-lib libxi libxtst xdotool libevdev
whisper-rs + clang Note
whisper-rs-sys may fail under clang:
fatal error: 'array' file not found
This is why libstdc++-14-dev is pointed to in the docs: on Ubuntu runners, clang may pick up GCC 14 C++ headers.
6. Windows Prerequisites
Install:
- Rust via
rustup - Visual Studio Build Tools 2022 or Visual Studio with Desktop development with C++ workload
- MSVC target used by CI and release builds:
x86_64-pc-windows-msvc
Next Steps
- Getting Set Up - Full desktop contributor setup
- Architecture - How the core fits into the desktop app and RPC flow