[package]
name = "azzurro"
authors = ["Sébastien LUNDI"]
description = "Rust parsing library for the ZCS Azzurro Portal API — retrieve solar production, battery, and energy consumption data"
readme = "README.md"
license = "MIT"
repository = "https://codeberg.org/slundi/azzurro"
keywords = ["solar", "battery", "energy", "zcs", "azzurro"]
categories = ["api-bindings"]
version = "0.1.0"
edition = "2024"

[lib]
name = "azzurro"
path = "src/lib.rs"

[package.metadata.docs.rs]
targets = [
    "x86_64-unknown-linux-gnu",
]


[dependencies]
serde = { version = "1", features = ["derive"] }

[dev-dependencies]
serde_json = "1"

[workspace.metadata.cargo-machete]
ignored = []

# --- Profiles ---

# Standard Dev Profile (Optimized for speed of compilation)
[profile.dev]
opt-level = 0
debug = true

# Production Release Profile
# This ensures the Nix-built binary is highly optimized
[profile.release]
opt-level = 3     # Max optimizations
lto = "fat"       # Link Time Optimization (smaller, faster binary)
codegen-units = 1 # Better optimizations at the cost of compile time
panic = "abort"   # Removes stack unwinding (smaller binary size)
strip = true      # Automatically strips symbols/debug info (like 'strip' command)

# Profile for Benchmarking
[profile.bench]
extend = "release"
debug = false

# --- Features ---
# [features]
# default = []
# async = ["dep:tokio"] # must be in dependencies
