[package]
name = "cfsem"
version = "11.2.0"
edition = "2024"
authors = ["Commonwealth Fusion Systems <jlogan@cfs.energy>"]
license = "MIT"
repository = "https://github.com/cfs-energy/cfsem-py"
homepage = "https://github.com/cfs-energy/cfsem-py"
description = "Quasi-steady electromagnetics including filamentized approximations, Biot-Savart, and Grad-Shafranov."
readme = "README.md"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "cfsem"
crate-type = ["cdylib", "rlib"]

[lints.rust]
unsafe_code = "forbid"

[dependencies]
pyo3 = { version = "0.29.0", features = ["extension-module", "abi3-py310", "generate-import-lib"], optional = true }
numpy = { version="0.29.0", optional=true }  # This must match pyo3 version!

nalgebra = "^0.34.2"
rayon = "^1.12.0"
num_cpus = "^1.17.0"
libm = "^0.2"
num-traits = { version = "0.2.19", features = ["libm"] }
faer = "0.24.4"
faer-traits = "0.24.0"

[dev-dependencies]
criterion = "0.8.2"
itertools = "0.15.0"

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
overflow-checks = true

[profile.dev]
# Nearly full optimizations so that tests run in a reasonable time
opt-level = 3
codegen-units = 16

[features]
default = []
python = ["pyo3", "numpy"]

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

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

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

[package.metadata.docs.rs]
rustdoc-args = [ "--html-in-header", "katex-header.html" ]
