ruvnet/ruv-FANN

Neural networks and weight-space programming in Rust, JavaScript and WebAssembly. Inspect activations, edit weights, evaluate candidates, train small models, and explicitly promote or roll back revisions.

What it solves

ruv-FANN provides a set of Rust-based tools for building, training, and running neural networks, specifically focusing on feedforward networks, time-series forecasting, and efficient inference. It addresses the need for high-performance, reusable neural network components that can be deployed across native Rust environments, WebAssembly (WASM) in browsers, and Node.js, while offering specialized tools for batch optimization and GPU-accelerated operations.

How it works

The project is organized into independent Rust workspaces. The core ruv-fann library allows you to define, train, and save neural networks. For production, it provides a prepare() method that creates an immutable snapshot of your network, allowing for high-performance, memory-efficient inference that can be shared across threads or exported to WASM. It supports various training algorithms like Adam and backpropagation, and includes utilities for batch processing to maximize throughput.

Who it’s for

This project is for Rust developers who need to integrate neural networks directly into their applications without relying on heavy external machine learning frameworks. It is also suitable for developers building cross-platform tools that require consistent neural inference performance in both native environments and web browsers.

Highlights

  • Flexible Inference: Supports both standard vector-based inference and high-performance batch processing for repeated tasks.
  • Cross-Platform: Runs natively in Rust and compiles to WebAssembly for use in Node.js and web browsers.
  • Optimization Tools: Includes MetaHarness for tuning batch sizes and Rune for verifying build provenance and correctness.
  • Hardware Acceleration: Offers optional support for WGPU (WebGPU) to offload matrix operations to the GPU.
  • Modular Design: Provides separate packages for specialized tasks like time-series forecasting, image processing (via OpenCV bindings), and agent coordination.

Related

  • Project
  • Project
  • Project
  • Project
  • Project