git-subtree-dir: vendor/ruvector git-subtree-split: b64c21726f2bb37286d9ee36a7869fef60cc6900
138 lines
3.8 KiB
TOML
138 lines
3.8 KiB
TOML
# Standalone crate - not part of main workspace
|
|
[workspace]
|
|
|
|
[package]
|
|
name = "ruvllm-esp32"
|
|
version = "0.3.0"
|
|
edition = "2021"
|
|
rust-version = "1.75"
|
|
authors = ["Ruvector Team"]
|
|
description = "Tiny LLM inference for ESP32 microcontrollers with INT8/INT4 quantization, multi-chip federation, RuVector semantic memory, and SNN-gated energy optimization"
|
|
license = "MIT"
|
|
readme = "README.md"
|
|
keywords = ["esp32", "llm", "inference", "embedded", "microcontroller"]
|
|
categories = ["embedded", "no-std", "science"]
|
|
repository = "https://github.com/ruvnet/ruvector"
|
|
homepage = "https://github.com/ruvnet/ruvector/tree/main/examples/ruvLLM/esp32"
|
|
documentation = "https://docs.rs/ruvllm-esp32"
|
|
|
|
[dependencies]
|
|
# ESP32 HAL and runtime (only for actual ESP32 builds)
|
|
esp-idf-svc = { version = "0.49", default-features = false, optional = true }
|
|
esp-idf-hal = { version = "0.44", default-features = false, optional = true }
|
|
esp-idf-sys = { version = "0.35", default-features = false, optional = true }
|
|
|
|
# no_std compatible dependencies
|
|
heapless = { version = "0.8", features = ["serde"] } # Fixed-size collections with serde
|
|
libm = "0.2" # Math functions for no_std
|
|
fixed = "1.28" # Fixed-point arithmetic
|
|
|
|
# Embedded-friendly serialization
|
|
postcard = { version = "1.0", default-features = false }
|
|
serde = { version = "1.0", default-features = false, features = ["derive"] }
|
|
|
|
# Logging
|
|
log = "0.4"
|
|
|
|
# For host testing
|
|
anyhow = { version = "1.0", optional = true }
|
|
|
|
[dev-dependencies]
|
|
criterion = { version = "0.5", features = ["html_reports"] }
|
|
|
|
[features]
|
|
default = ["host-test", "federation"]
|
|
# Host testing mode (no ESP32 dependencies)
|
|
host-test = ["anyhow"]
|
|
# Full ESP32 std mode
|
|
esp32-std = ["esp-idf-svc", "esp-idf-hal", "esp-idf-sys", "anyhow"]
|
|
# Pure no_std for bare metal
|
|
no_std = []
|
|
# Enable SIMD on ESP32-S3 (has vector extensions)
|
|
esp32s3-simd = []
|
|
# Quantization levels
|
|
q8 = [] # INT8 quantization (default)
|
|
q4 = [] # INT4 quantization (more compression)
|
|
binary = [] # Binary weights (1-bit, extreme compression)
|
|
# Federation for multi-chip clusters
|
|
federation = []
|
|
# Self-learning with MicroLoRA
|
|
self-learning = []
|
|
|
|
[profile.release]
|
|
opt-level = "z" # Optimize for size
|
|
lto = true # Link-time optimization
|
|
codegen-units = 1 # Single codegen unit for better optimization
|
|
panic = "abort" # Smaller panic handling
|
|
strip = true # Strip symbols
|
|
|
|
[profile.dev]
|
|
opt-level = 1 # Some optimization even in dev
|
|
|
|
[[bin]]
|
|
name = "ruvllm-esp32"
|
|
path = "src/main.rs"
|
|
|
|
[[example]]
|
|
name = "embedding_demo"
|
|
path = "examples/embedding_demo.rs"
|
|
|
|
[[example]]
|
|
name = "classification"
|
|
path = "examples/classification.rs"
|
|
|
|
[[example]]
|
|
name = "optimization_demo"
|
|
path = "examples/optimization_demo.rs"
|
|
|
|
[[example]]
|
|
name = "federation_demo"
|
|
path = "examples/federation_demo.rs"
|
|
required-features = ["federation"]
|
|
|
|
[[example]]
|
|
name = "massive_scale_demo"
|
|
path = "examples/massive_scale_demo.rs"
|
|
required-features = ["federation"]
|
|
|
|
[[example]]
|
|
name = "model_sizing_demo"
|
|
path = "examples/model_sizing_demo.rs"
|
|
|
|
[[example]]
|
|
name = "medium_scale_demo"
|
|
path = "examples/medium_scale_demo.rs"
|
|
required-features = ["federation"]
|
|
|
|
# RuVector Integration Examples
|
|
|
|
[[example]]
|
|
name = "rag_smart_home"
|
|
path = "examples/rag_smart_home.rs"
|
|
required-features = ["federation"]
|
|
|
|
[[example]]
|
|
name = "anomaly_industrial"
|
|
path = "examples/anomaly_industrial.rs"
|
|
required-features = ["federation"]
|
|
|
|
[[example]]
|
|
name = "swarm_memory"
|
|
path = "examples/swarm_memory.rs"
|
|
required-features = ["federation"]
|
|
|
|
[[example]]
|
|
name = "space_probe_rag"
|
|
path = "examples/space_probe_rag.rs"
|
|
required-features = ["federation"]
|
|
|
|
[[example]]
|
|
name = "voice_disambiguation"
|
|
path = "examples/voice_disambiguation.rs"
|
|
required-features = ["federation"]
|
|
|
|
[[example]]
|
|
name = "snn_gated_inference"
|
|
path = "examples/snn_gated_inference.rs"
|
|
required-features = ["federation"]
|