[package]
name = "oersted"
version = "0.2.0"
edition = "2024"
authors = ["Ryan Etkins <retkins@pm.me>"]
description = "Lightning-fast magnetic fields calculations"
license = "MIT OR Apache-2.0"
license-files = ["LICENSE-MIT", "LICENSE-APACHE"]
repository = "https://github.com/retkins/oersted/"
homepage = "https://retkins.github.io/oersted/"

[dependencies]
numpy = {version = "0.28.0", optional=true}
pyo3 = {version = "0.28.2", features = ["extension-module", "abi3-py310", "generate-import-lib"] , optional=true}
rayon = {version = "1.11.0", optional=true}

# Enable features with the flag: --features python
[features]
default = [] 
parallel = ["rayon"]
python = ["dep:numpy", "dep:pyo3", "parallel"]


[lib]
name = "oersted" 
crate-type = ["cdylib"]

[profile.release]
opt-level = 3
lto = "fat" 
codegen-units = 1

[profile.test]
opt-level = 3

[package.metadata.docs.rs]
all-features = true
rustdoc-args = [ "--html-in-header", "src/docs-header.html", "--cfg", "docsrs"]
