Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Installation

This guide covers installing RustKernels and its dependencies.

Prerequisites

Rust Toolchain

RustKernels requires Rust 1.85 or later:

# Install Rust via rustup
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

# Update to latest stable
rustup update stable

# Verify version
rustc --version  # Should be 1.85.0 or higher

RingKernel Framework

RustKernels depends on RingKernel 0.4.2 for GPU execution. RingKernel is published on crates.io and is resolved automatically by Cargo — no manual installation is required.

CUDA Toolkit (Optional)

For GPU acceleration, install the CUDA toolkit:

  • Linux: Install via your package manager or from NVIDIA’s website
  • Windows: Download the installer from NVIDIA
  • macOS: Not supported for CUDA (CPU fallback only)
# Verify CUDA installation
nvcc --version
nvidia-smi

If CUDA is not available, RustKernels falls back to CPU execution automatically.

Adding RustKernels to Your Project

Basic Installation

Add to your Cargo.toml:

[dependencies]
rustkernels = "0.4.0"

This includes the default feature set: graph, ml, compliance, temporal, risk.

Selective Installation

Include only the domains you need to reduce compile time and binary size:

[dependencies]
rustkernels = { version = "0.4.0", default-features = false, features = ["graph", "accounting"] }

Full Installation

Include all 14 domains:

[dependencies]
rustkernels = { version = "0.4.0", features = ["full"] }

Service Deployment

For deploying kernels as REST or gRPC services:

[dependencies]
rustkernel-ecosystem = { version = "0.4.0", features = ["axum", "grpc"] }

Available Features

FeatureDomainDescription
graphGraph AnalyticsCentrality, community detection, GNN inference
mlStatistical MLClustering, anomaly detection, NLP embeddings
complianceComplianceAML, KYC, sanctions screening
temporalTemporal AnalysisForecasting, anomaly detection, decomposition
riskRisk AnalyticsCredit scoring, VaR, stress testing
bankingBankingFraud pattern detection
behavioralBehavioralProfiling, forensics
orderbookOrder MatchingOrder book engine
procintProcess IntelligenceDFG, conformance checking, digital twin
clearingClearingNetting, settlement
treasuryTreasuryCash flow, FX hedging
accountingAccountingNetwork generation, reconciliation
paymentsPaymentsPayment processing
auditAuditFeature extraction
fullAllEnables all domains

Building from Source

Clone and build the entire workspace:

# Clone the repository
git clone https://github.com/mivertowski/RustKernels.git
cd RustKernels

# Build all crates
cargo build --workspace

# Build in release mode
cargo build --workspace --release

# Run all tests (895 tests)
cargo test --workspace

# Lint
cargo clippy --all-targets --all-features -- -D warnings

Verifying Installation

Create a simple test file:

// src/main.rs
use rustkernels::prelude::*;

fn main() {
    println!("RustKernels v0.4.0 installed successfully!");
    println!("RingKernel 0.4.2 — GPU-native persistent actor runtime");
}

Run with:

cargo run

Troubleshooting

CUDA Not Detected

If GPU execution is not working:

  1. Verify CUDA installation with nvcc --version
  2. Check GPU availability with nvidia-smi
  3. Ensure CUDA libraries are in your PATH
  4. RustKernels falls back to CPU automatically if CUDA is not available

Compilation Errors

For Rust version issues:

# Ensure you are on the correct toolchain
rustup override set stable
rustup update

Dependency Resolution

RingKernel 0.4.2 is resolved from crates.io. If you encounter resolution issues:

# Update the Cargo registry index
cargo update

# Clear the build cache if needed
cargo clean && cargo build --workspace

Next Steps