Installation

This guide covers installing the JACS Rust CLI and library.

Requirements

  • Rust: Version 1.93 or later (Edition 2024)
  • Cargo: Included with Rust installation

Verify Rust Version

rustc --version
# Should show rustc 1.93.0 or later

If you need to update Rust:

rustup update stable

Installing the CLI

cargo install jacs --features cli

From Source

git clone https://github.com/HumanAssisted/JACS
cd JACS/jacs
cargo install --path . --features cli

Verify Installation

jacs --help

Using as a Library

Add JACS to your Cargo.toml:

[dependencies]
jacs = "0.3"

With Optional Features

JACS supports several optional features for observability and integrations:

[dependencies]
# Basic library usage
jacs = "0.3"

# With OpenTelemetry logging
jacs = { version = "0.3", features = ["otlp-logs"] }

# With OpenTelemetry metrics
jacs = { version = "0.3", features = ["otlp-metrics"] }

# With OpenTelemetry tracing
jacs = { version = "0.3", features = ["otlp-tracing"] }

# With all observability features
jacs = { version = "0.3", features = ["otlp-logs", "otlp-metrics", "otlp-tracing"] }

Available Features

FeatureDescription
cliEnables CLI binary build with clap and ratatui
otlp-logsOpenTelemetry Protocol logging backend
otlp-metricsOpenTelemetry Protocol metrics backend
otlp-tracingOpenTelemetry Protocol distributed tracing
observability-convenienceHelper wrappers for metrics and logging
mcp-serverModel Context Protocol server integration surface

Platform Support

JACS supports the following platforms:

PlatformArchitectureSupport
Linuxx86_64, aarch64Full support
macOSx86_64, aarch64Full support
Windowsx86_64Full support
WebAssemblywasm32Partial (no post-quantum crypto, limited storage)

WebAssembly Notes

When targeting WebAssembly, some features are unavailable:

  • Post-quantum cryptographic algorithms (pq-dilithium)
  • File system storage backend
  • HTTP-based remote operations

Configuration

After installation, initialize JACS:

# Create configuration and agent in one step
jacs init

This creates:

  • ~/.jacs/jacs.config.json - Configuration file
  • Cryptographic keys for your agent
  • Initial agent document

Manual Configuration

Alternatively, create configuration and agent separately:

# Create configuration only
jacs config create

# Create agent with keys
jacs agent create --create-keys true

Environment Variables

JACS respects the following environment variables:

VariableDescriptionDefault
JACS_CONFIG_PATHPath to configuration file./jacs.config.json
JACS_USE_SECURITYEnable/disable security featurestrue
JACS_DATA_DIRECTORYDirectory for document storage./jacs_data
JACS_KEY_DIRECTORYDirectory for cryptographic keys./jacs_keys
JACS_DEFAULT_STORAGEStorage backend (fs, memory)fs
JACS_AGENT_KEY_ALGORITHMKey algorithm (ring-Ed25519, RSA-PSS, pq-dilithium)ring-Ed25519

Troubleshooting

Build Errors

"edition 2024 is required" Update Rust to version 1.93 or later:

rustup update stable

Missing dependencies on Linux Install build essentials:

# Debian/Ubuntu
sudo apt-get install build-essential pkg-config libssl-dev

# Fedora
sudo dnf install gcc openssl-devel

Runtime Errors

"Configuration file not found" Run jacs init or set JACS_CONFIG_PATH environment variable.

"Key directory does not exist" Create the key directory or run jacs init:

mkdir -p ./jacs_keys

"Permission denied" Ensure you have write permissions to the data and key directories.

Next Steps