[package]
name = "apex-solver"
version = "0.1.6"
edition = "2024"
authors = ["Amin Abouee <amin.abouee@gmail.com>"]
description = "A high-performance Rust library for nonlinear least squares optimization with Lie group support, designed for SLAM, bundle adjustment, and pose graph optimization"
license = "Apache-2.0"
repository = "https://github.com/amin-abouee/apex-solver"
homepage = "https://github.com/amin-abouee/apex-solver"
documentation = "https://docs.rs/apex-solver"
readme = "README.md"
keywords = ["optimization", "slam", "computer-vision", "robotics", "nonlinear"]
categories = ["algorithms", "science", "mathematics"]
exclude = [
    "data_bk/*",
    "doc/*.md",
    "!doc/CHANGELOG.md",
    "profiles/*",
    "output/*",
    ".github/*",
    ".claude/*",
    ".rust_rules.mdc",
    "CLAUDE.md",
]

[[bin]]
name = "optimize_3d_graph"
path = "bin/optimize_3d_graph.rs"

[[bin]]
name = "optimize_2d_graph"
path = "bin/optimize_2d_graph.rs"


[[example]]
name = "visualize_graph_file"
required-features = ["visualization"]

[[example]]
name = "visualize_optimization"
required-features = ["visualization"]

[features]
default = []
visualization = ["dep:rerun"]

[dependencies]
thiserror = "2.0.17"
nalgebra = { version = "0.33", features = ["convert-glam029"] }
memmap2 = "0.9"
rayon = "1.11"
rand = "0.9.2"
rerun = { version = "0.26.2", features = ["sdk"], optional = true }
faer = { version = "0.22", features = ["sparse"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
clap = { version = "4.5", features = ["derive"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
chrono = "0.4"
colored = "2.1"
num_cpus = "1.16"

[dev-dependencies]
criterion = "0.6.0"
tempfile = "3.23"
tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] }
factrs = "0.2.0"
tiny-solver = "0.17"
csv = "1.4"
serde = { version = "1.0", features = ["derive"] }

[[bench]]
name = "solver_comparison"
harness = false

[profile.dev]
split-debuginfo = "unpacked"  # Faster linking, less memory usage
debug = 1  # Line numbers only, not full debug info

[profile.test]
split-debuginfo = "unpacked"  # Faster linking, less memory usage
debug = 1  # Line numbers only, not full debug info

[profile.profiling]
inherits = "release"
debug = true  # Include debug symbols for better profiling with samply/flamegraph

[lints.clippy]
unwrap_used = "deny"
expect_used = "deny"
