Crate rustkernels

Crate rustkernels 

Source
Expand description

§RustKernels

GPU-accelerated kernel library for financial services, analytics, and compliance workloads.

RustKernels is a Rust port of the DotCompute GPU kernel library, leveraging the RustCompute (RingKernel) framework for GPU-native persistent actors.

§Features

  • 16 Domain Categories: Graph analytics, ML, compliance, risk, temporal analysis, and more
  • 173+ Kernels: Comprehensive coverage of financial and analytical algorithms
  • Dual Execution Modes:
    • Batch: CPU-orchestrated, 10-50μs overhead, for periodic heavy computation
    • Ring: GPU-persistent actor, 100-500ns latency, for high-frequency operations
  • Enterprise Licensing: Domain-based licensing and feature gating
  • Multi-Backend: CUDA, WebGPU, and CPU backends via RustCompute

§Quick Start

use rustkernel::prelude::*;

#[tokio::main]
async fn main() -> Result<()> {
    // Create a kernel registry
    let registry = KernelRegistry::new();

    // Get runtime with best available backend
    let runtime = RingKernel::builder()
        .backend(Backend::Auto)
        .build()
        .await?;

    // Launch a specific kernel
    let pagerank = runtime.launch("graph/pagerank", LaunchOptions::default()).await?;

    // Use it
    pagerank.send(PageRankRequest { node_id: 42, operation: PageRankOp::Query }).await?;
    let response: PageRankResponse = pagerank.receive().await?;

    Ok(())
}

§Domain Organization

Kernels are organized into domains representing different business/analytical areas:

§Priority 1 (High Value)

  • GraphAnalytics: Centrality, community detection, motifs, similarity
  • StatisticalML: Clustering, anomaly detection, regression
  • Compliance: AML, KYC, sanctions screening
  • TemporalAnalysis: Forecasting, change detection, decomposition
  • RiskAnalytics: Credit risk, VaR, portfolio risk

§Priority 2 (Medium)

  • Banking: Fraud detection
  • BehavioralAnalytics: Profiling, forensics
  • OrderMatching: HFT order book
  • ProcessIntelligence: Process mining
  • Clearing: Settlement, netting

§Priority 3 (Lower)

  • TreasuryManagement: Cash flow, hedging
  • Accounting: Chart of accounts, reconciliation
  • PaymentProcessing: Transaction execution
  • FinancialAudit: Feature extraction

§Feature Flags

Enable domain crates via Cargo features:

[dependencies]
rustkernel = { version = "0.1", features = ["graph", "ml", "risk"] }

Available features:

  • default: graph, ml, compliance, temporal, risk
  • full: All domains
  • Individual: graph, ml, compliance, temporal, risk, banking, etc.

Re-exports§

pub use rustkernel_core as core;
pub use ringkernel;
pub use ringkernel_core;
pub use rustkernel_graph as graph;
pub use rustkernel_ml as ml;
pub use rustkernel_compliance as compliance;
pub use rustkernel_temporal as temporal;
pub use rustkernel_risk as risk;

Modules§

catalog
Kernel catalog providing overview of all available kernels.
prelude
Prelude module for convenient imports.
version
Version information.

Attribute Macros§

gpu_kernel
Define a GPU kernel with metadata.
kernel_state
Attribute for marking kernel state types.

Derive Macros§

KernelMessage
Derive macro for kernel messages.