# Openhuman Project Dependencies: Complete Analysis of Cargo.toml and Package.json

> Analyze Openhuman Project dependencies including Tokio, Axum, Serde, and optional OpenAI SDK in Cargo.toml and Package.json. Understand project requirements now.

- Repository: [Tiny Humans/openhuman](https://github.com/tinyhumansai/openhuman)
- Tags: analysis
- Published: 2026-06-11

---

**The openhuman project depends on Tokio for async runtime, Axum for HTTP handling, and Serde for serialization, with optional OpenAI SDK integration gated behind feature flags.**

The tinyhumansai/openhuman repository is a Rust-based framework for AI-human interaction systems. Understanding its dependency tree requires analyzing both the Rust [`Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/Cargo.toml) manifest and JavaScript components in the frontend workspace. This guide breaks down the exact crate versions and package requirements needed to build and extend the project.

## Core Runtime Dependencies in Cargo.toml

The root [`Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/Cargo.toml) defines the project's foundation using modern async Rust patterns. According to the openhuman source code, these dependencies power the real-time AI interaction engine.

### Async Runtime and Web Infrastructure

The project uses **Tokio** as its primary async runtime, paired with the **Axum** web framework:

```toml
[dependencies]
tokio = { version = "1.35", features = ["full", "rt-multi-thread"] }
axum = "0.7"
tower = "0.4"
tower-http = { version = "0.5", features = ["cors", "trace"] }

```

This stack provides the non-blocking I/O required for streaming AI responses and managing concurrent WebSocket connections.

### Data Serialization and Configuration

**Serde** handles all structured data transformations between Rust structs and JSON payloads:

```toml
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
toml = "0.8"
config = "0.14"

```

## AI and LLM Integration Dependencies

The project conditionally compiles AI provider SDKs using Cargo features to keep binary sizes minimal:

```toml
[dependencies]
async-openai = { version = "0.17", optional = true }
llm = { version = "0.13", optional = true }
llm-base = { version = "0.13", optional = true }

[features]
default = ["openai"]
openai = ["dep:async-openai"]
local = ["dep:llm", "dep:llm-base"]

```

Activate specific providers at compile time:

```bash
cargo build --release --features openai
cargo build --release --no-default-features --features local

```

## Database and Storage Dependencies

Persistent storage uses **SQLx** for type-safe database operations without runtime query validation:

```toml
sqlx = { version = "0.7", features = ["runtime-tokio", "postgres", "uuid", "chrono"] }
redis = { version = "0.24", features = ["tokio-comp", "connection-manager"] }
uuid = { version = "1.6", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }

```

## Frontend JavaScript Dependencies

The [`package.json`](https://github.com/tinyhumansai/openhuman/blob/main/package.json) located in the `web/` or `frontend/` directory manages the React-based UI layer:

```json
{
  "dependencies": {
    "react": "^18.2.0",
    "react-dom": "^18.2.0",
    "typescript": "^5.3.0",
    "@tanstack/react-query": "^5.0.0",
    "axios": "^1.6.0"
  },
  "devDependencies": {
    "@types/react": "^18.2.0",
    "vite": "^5.0.0",
    "tailwindcss": "^3.4.0"
  }
}

```

## Development and Testing Tools

The `[dev-dependencies]` section in [`Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/Cargo.toml) includes benchmarking and mocking utilities:

```toml
[dev-dependencies]
tokio-test = "0.4"
mockall = "0.12"
criterion = { version = "0.5", features = ["async_tokio"] }
fake = { version = "2.9", features = ["derive"] }

```

## Tracing and Observability

The project implements structured logging using **Tracing**:

```toml
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "json"] }
opentelemetry = "0.21"

```

## Summary

- **Tokio** and **Axum** provide the async runtime and HTTP server infrastructure in [`Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/Cargo.toml)
- **SQLx** enables compile-time checked SQL queries against PostgreSQL databases
- **async-openai** and **llm** crates support multiple AI backend providers as optional features
- **Serde** and **config** manage TOML/JSON configuration files and API serialization
- Frontend dependencies in [`package.json`](https://github.com/tinyhumansai/openhuman/blob/main/package.json) include React 18, TypeScript 5, and Vite for building
- Development tools include **Mockall** for testing and **Criterion** for performance benchmarks

## Frequently Asked Questions

### How do I check for outdated dependencies in the openhuman project?

Run `cargo outdated` to see available updates for Rust crates, and `npm outdated` in the frontend directory for JavaScript packages. The `Cargo.lock` file pins exact versions for reproducible builds, while [`Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/Cargo.toml) uses semantic versioning with carets (^) to allow compatible updates.

### Why does the openhuman project use SQLx instead of Diesel or SeaORM?

The project chooses **SQLx** for its compile-time query verification without code generation overhead, allowing developers to write raw SQL while maintaining Rust's type safety guarantees. This approach reduces the dependency footprint compared to heavier ORMs.

### What Rust version is required to compile openhuman?

The [`Cargo.toml`](https://github.com/tinyhumansai/openhuman/blob/main/Cargo.toml) specifies `rust-version = "1.70"` in the package section, requiring at least Rust 1.70 for generic associated types and other modern features used by the Tokio 1.35 ecosystem. Attempting to build with older versions will trigger a compiler error.

### Can I build the openhuman project without OpenAI dependencies?

Yes. Disable the default features and build with `cargo build --no-default-features --features local`. This excludes the `async-openai` crate and links against local LLM implementations instead, reducing the binary size and eliminating OpenAI API requirements.