neuroflow
Library Listed Dormant
The neural network library implemented in Rust
- Downloads
- 96
- Dependents
- 0
- Stars
- 121
- Forks
- 20
- Contributors
- 2
- Commits
- 203
- Latest release
- 0.2.0 ·
About

NeuroFlow is fast Neural Networks (deep learning) Rust crate. It relies on three pillars: speed, reliability, and speed again.
...I would write if this library was going to be the second PyTorch from the Rust world. However, this repository found its place in the educational area and can be used by young Rustaceans to enter the world of Neural Networks.
How to use
Let's try to approximate a very simple function 0.5*sin(e^x) - cos(e^(-x)).
Read the full README
extern crate neuroflow;
use neuroflow::FeedForward;
use neuroflow::data::DataSet;
use neuroflow::activators::Type::Tanh;
fn main(){
/*
Define a neural network with 1 neuron in input layers. The network contains 4 hidden layers.
And, such as our function returns a single value, it is reasonable to have 1 neuron in the output layer.
*/
let mut nn = FeedForward::new(&[1, 7, 8, 8, 7, 1]);
/*
Define DataSet.
DataSet is the Type that significantly simplifies work with neural networks.
The majority of its functionality is still under development :(
*/
let mut data: DataSet = DataSet::new();
let mut i = -3.0;
// Push the data to DataSet (method push accepts two slices: input data and expected output)
while i <= 2.5 {
data.push(&[i], &[0.5*(i.exp().sin()) - (-i.exp()).cos()]);
i += 0.05;
}
// Here, we set the necessary parameters and train the neural network by our DataSet with 50 000 iterations
nn.activation(Tanh)
.learning_rate(0.01)
.train(&data, 50_000);
let mut res;
// Let's check the result
i = 0.0;
while i <= 0.3{
res = nn.calc(&[i])[0];
println!("for [{:.3}], [{:.3}] -> [{:.3}]", i, 0.5*(i.exp().sin()) - (-i.exp()).cos(), res);
i += 0.07;
}
}
Expected output
for [0.000], [-0.120] -> [-0.119]
for [0.070], [-0.039] -> [-0.037]
for [0.140], [0.048] -> [0.050]
for [0.210], [0.141] -> [0.141]
for [0.280], [0.240] -> [0.236]
But we don't want to lose our trained network so easily. So, there is functionality to save and restore neural networks from files.
/*
In order to save neural network into file call function save from neuroflow::io module.
The first argument is the link to the saving neural network;
The second argument is the path to the file.
*/
neuroflow::io::save(&mut nn, "test.flow").unwrap();
/*
After we have saved the neural network to the file we can restore it by calling
of load function from neuroflow::io module.
We must specify the type of new_nn variable.
The only argument of the load function is the path to a file containing
the neural network
*/
let mut new_nn: FeedForward = neuroflow::io::load("test.flow").unwrap();
Classic XOR problem (with no classic input of data)
Let's create a file named TerribleTom.csv at the root of the project. This file should have the following innards:
0,0,-,0
0,1,-,1
1,0,-,1
1,1,-,0
where - is the delimiter that separates the input vector from its desired output vector.
extern crate neuroflow;
use neuroflow::FeedForward;
use neuroflow::data::DataSet;
use neuroflow::activators::Type::Tanh;
fn main(){
/*
Define a neural network with 2 neurons in input layers,
1 hidden layer (with 2 neurons),
1 neuron in the output layer
*/
let mut nn = FeedForward::new(&[2, 2, 1]);
// Here we load data for XOR from the file `TerribleTom.csv`
let mut data = DataSet::from_csv("TerribleTom.csv");
// Set parameters and train the network
nn.activation(Tanh)
.learning_rate(0.1)
.momentum(0.15)
.train(&data, 20_000);
let mut res;
let mut d;
for i in 0..data.len(){
res = nn.calc(data.get(i).0)[0];
d = data.get(i);
println!("for [{:.3}, {:.3}], [{:.3}] -> [{:.3}]", d.0[0], d.0[1], d.1[0], res);
}
}
Expected output
for [0.000, 0.000], [0.000] -> [0.000]
for [1.000, 0.000], [1.000] -> [1.000]
for [0.000, 1.000], [1.000] -> [1.000]
for [1.000, 1.000], [0.000] -> [0.000]
Installation
Insert into your project's cargo.toml block next line
[dependencies]
neuroflow = "~0.2"
Then in project root file
extern crate neuroflow;
License
MIT License
Attribution
The origami bird from the logo is made by Freepik
Compatibility
- Runs on
- GPU support unknown
What shows it
- no dependency or feature matches a backend row
- Native code
- None found
- No native code found
- Python bindings
- No Python binding crate found
- License
- MIT
Compare with similar projects
Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
The neural network library implemented in Rust |
96 downloads over 30 days | 0 | 121 | 0.2.0 | GPU support unknown | No native code found | MIT |
|
tch-rs Featured
Rust wrappers for the PyTorch C++ api (libtorch). Python bindings |
1,190,464 downloads over 30 days | 124 | 5,518 | 0.26.0 | CUDA | Binds native code: tch, torch-sys. Build uses a native toolchain: cc | Apache-2.0 OR MIT |
|
ruv-fann Listed
A pure Rust implementation of the Fast Artificial Neural Network (FANN) library Python bindings |
270 downloads over 30 days | 7 | 388 | 0.2.1 | CUDA, WebGPU | Binds native code: libsqlite3-sys, win-sys, torch-sys (feature neural-networks). Build uses a native toolchain: cc | Apache-2.0 OR MIT |
|
Trains GPT-style language models from a YAML config and a tokenized dataset: dense GQA transformers, Mamba 1, 2 and 3, MLA and MoE layers on CPU or CUDA. Runs the training loop, optimizer, checkpoints, evaluation and metrics on boostr, and builds speech corpora through voxr. |
27 downloads over 30 days | Not applicable | 8 | 0.1.1 | CUDA | Binds native code: nvml-wrapper-sys (feature cuda) | Apache-2.0 |
|
rust-lstm Listed
A complete LSTM neural network library with training capabilities, multiple optimizers, and peephole variants. |
15 downloads over 30 days | 0 | 24 | 0.10.0 | GPU support unknown | No native code found | MIT |
|
Wrapper for the Fast Artificial Neural Networks library |
10 downloads over 30 days | 0 | 16 | 0.1.8 | GPU support unknown | Binds native code: fann-sys | LGPL-3.0 |
|
Basic neural network library for classification. |
0 downloads over 30 days | 0 | 45 | 0.6.3 | GPU support unknown | No native code found | Apache-2.0 |
Why ListedNo archive, New or Featured rule places it, so it is Listed.
What it lacks for Featured
- It has 0 active dependents and 0 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days. The repository route reads 121 stars, 20 forks and 2 contributors. It needs 4,539 stars, 434 forks and 79 contributors together.
- The project is dormant and not finished. Dormancy rule
What else the check found
- The last activity is on 18 Aug 2023, 1179 days ago. That reaches the 365 days the rules expect, so the project is dormant. Dormancy rule
- The latest release requires the deprecated dependency bincode. RUSTSEC-2025-0141 Rot signals rule
Not measured: Latest release fails cargo check.
Exact rules: Listed, Featured library. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: version 0.2.0 base 80, raised to the 365-day floor: E = 365 daysdormancy: last activity 2023-08-18, 1179 days ago, E = 365: dormantrot: deprecated requirement `bincode (RUSTSEC-2025-0141, https://rustsec.org/advisories/RUSTSEC-2025-0141.html)`featured: not featured: active_users 0 < 11 and new_adopters 0 < 9 and repository route stars 121 (needs 4539), forks 20 (needs 434), contributors 2 (needs 79); dormant and not stablelisted: listed: no archive, new or featured rule applies
Measurements and sources
Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.
Sources6 sources
- Description: the crates.io description
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption0 active dependents, 0 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 0 | crates.io database dump | Yes | |
| New dependents (365 days) | 0 | crates.io database dump | Yes | |
| Peak active dependents | 0 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 1 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 3 years ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2023-08-18 | GitHub repository | Yes | |
| Latest release | 2023-08-18 | crates.io database dump | Yes | |
| First release | 2017-11-12 | crates.io database dump | Yes | |
| Latest version | 0.2.0 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 0 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 0 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | bincode (RUSTSEC-2025-0141, https://rustsec.org/advisories/RUSTSEC-2025-0141.html) | crates.io database dump | Yes |
Distribution5 releases, 96 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 5 | crates.io database dump | Yes | |
| Downloads over 30 days | 96 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | Yes | ||
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository121 stars, 20 forks, 2 contributors, 203 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 121 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 20 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 2 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 203 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | MIT | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | GPU support unknown | crates.io database dump | No | |
| What shows each backend | no dependency or feature matches a backend row | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | No native code found | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | No Python binding crate found | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 0 | crates.io database dump | No |
Corrections and review history
No correction applies to this entry.
Judgments
A judgment enters only through an approved issue and a merged pull request.
No judgment applies to this entry.