tinymind 0.3.8

Neural networks for embedded Rust: a no_std, allocation-free port of the tinymind (C++) library, bit-exact with it
Documentation
[package]
name = "tinymind"
version = "0.3.8"
edition = "2024"
# Edition 2024 needs 1.85. CI runs the tests on this version.
rust-version = "1.85"
license = "MIT"
description = "Neural networks for embedded Rust: a no_std, allocation-free port of the tinymind (C++) library, bit-exact with it"
repository = "https://github.com/danmcleran/tinymind-rs"
homepage = "https://danmcleran.github.io/tinymind-rs/"
documentation = "https://docs.rs/tinymind"
readme = "README.md"
keywords = ["neural-network", "fixed-point", "embedded", "no-std", "tinyml"]
categories = ["embedded", "no-std", "no-std::no-alloc", "science", "algorithms"]
# Not part of the published crate: agent guidance, CI and its link check, the
# on-board benchmark, the docs site, and maintainer scripts (they need a tinymind checkout). Tests and
# their goldens stay, so `cargo test` works from the published source.
exclude = [".claude/", "CLAUDE.md", "data/optdigits.tra", "data/optdigits.tes", "ci/", "bench/", ".github/", "docs/", "scripts/", "tools/", ".gitignore", ".gitattributes"]

[dependencies]
# Optional: tanh and exp for floating-point networks without std (feature `libm`).
libm = { version = "0.2.16", optional = true }

[features]
# Host-side helpers that need floating-point math from std: turning float
# calibration scales into int8 requantizers and activation tables
# (int8::calibration). The library itself stays no_std without it.
std = []
# Floating-point Tanh and Sigmoid without std, from the libm crate (within a
# few ulps of glibc's, so not bit-identical to the C++ on a Linux host; with
# `std` the platform's math library is used instead).
libm = ["dep:libm"]

[package.metadata.docs.rs]
all-features = true

# The int8 example and its golden test calibrate from float scales.
[[example]]
name = "int8_xor"
required-features = ["std"]

[[test]]
name = "int8_xor_golden"
required-features = ["std"]

[[example]]
name = "imported_mlp"
required-features = ["std"]

[[example]]
name = "gbdt_tabular_int8"
required-features = ["std"]

[[example]]
name = "kws_cortex_m_int8"
required-features = ["std"]

[[example]]
name = "imported_cnn"
required-features = ["std"]

[[test]]
name = "imported_cnn_golden"
required-features = ["std"]

[[example]]
name = "imported_lstm"
required-features = ["std"]

[[test]]
name = "imported_lstm_golden"
required-features = ["std"]

[[test]]
name = "kws_int8_golden"
required-features = ["std"]

[[test]]
name = "gbdt_golden"
required-features = ["std"]

[[test]]
name = "imported_mlp_golden"
required-features = ["std"]

[[test]]
name = "softmax_sweep"
required-features = ["std"]

[[test]]
name = "fft_sweep"
required-features = ["std"]

[lints.rust]
# Kani proofs (src/kani_proofs.rs) are compiled only under cfg(kani).
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(kani)"] }