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

RustKernels

GPU-accelerated kernel library for financial services and analytics


Overview

RustKernels provides 106 GPU-accelerated algorithms across 14 domain-specific crates, designed for financial services, compliance, and enterprise analytics. Ported from the DotCompute C# implementation to Rust, using the RingKernel framework.

This is a specialized compute library for financial and enterprise workloads, not a general-purpose GPU compute framework.

Key Features

FeatureDescription
14 Domain CategoriesGraph analytics, ML, compliance, risk, treasury, and more
106 KernelsComprehensive coverage of financial algorithms
Dual Execution ModesBatch (CPU-orchestrated) and Ring (GPU-persistent)
Enterprise ReadyApache-2.0 license, domain-based feature gating
K2K MessagingCross-kernel coordination patterns
Fixed-Point ArithmeticExact financial calculations

Execution Modes

Kernels operate in one of two modes:

ModeLatencyOverheadState LocationBest For
Batch10-50μsHigherCPU memoryHeavy periodic computation
Ring100-500nsMinimalGPU memoryHigh-frequency streaming

Most kernels support both modes. Choose based on your latency requirements.

Domains at a Glance

DomainCrateKernelsDescription
Graph Analyticsrustkernel-graph28PageRank, community detection, GNN inference, graph attention
Statistical MLrustkernel-ml17Clustering, NLP embeddings, federated learning, healthcare analytics
Compliancerustkernel-compliance11AML patterns, KYC, sanctions screening
Temporal Analysisrustkernel-temporal7Forecasting, anomaly detection, decomposition
Risk Analyticsrustkernel-risk5Credit scoring, VaR, stress testing, correlation
Bankingrustkernel-banking1Fraud pattern matching
Behavioral Analyticsrustkernel-behavioral6Profiling, forensics, event correlation
Order Matchingrustkernel-orderbook1Order book matching engine
Process Intelligencerustkernel-procint7DFG, conformance, digital twin simulation
Clearingrustkernel-clearing5Netting, settlement, DVP matching
Treasuryrustkernel-treasury5Cash flow, FX hedging, liquidity
Accountingrustkernel-accounting9Network generation, reconciliation
Paymentsrustkernel-payments2Payment processing, flow analysis
Auditrustkernel-audit2Feature extraction, hypergraph construction

Quick Start

Add to your Cargo.toml:

[dependencies]
rustkernel = "0.1.0"

Basic usage:

use rustkernel::prelude::*;
use rustkernel::graph::centrality::PageRank;

// Create a kernel instance
let kernel = PageRank::new();

// Access kernel metadata
let metadata = kernel.metadata();
println!("Kernel: {}", metadata.id);
println!("Domain: {:?}", metadata.domain);

// Execute (batch mode)
let result = kernel.execute(input).await?;

Feature Flags

Control which domains are compiled:

# Only what you need
rustkernel = { version = "0.1.0", features = ["graph", "risk"] }

# Everything
rustkernel = { version = "0.1.0", features = ["full"] }

Default features: graph, ml, compliance, temporal, risk.

Requirements

  • Rust 1.85 or later
  • RustCompute (RingKernel framework)
  • CUDA toolkit (optional, falls back to CPU execution)

Project Structure

crates/
├── rustkernel/           # Facade crate, re-exports all domains
├── rustkernel-core/      # Core traits, registry, licensing
├── rustkernel-derive/    # Procedural macros
├── rustkernel-cli/       # Command-line interface
└── rustkernel-{domain}/  # 14 domain-specific crates

Building

# Build entire workspace
cargo build --workspace

# Run all tests
cargo test --workspace

# Test single domain
cargo test --package rustkernel-graph

# Generate API documentation
cargo doc --workspace --no-deps --open

License

Licensed under Apache-2.0. See LICENSE for details.