npdatetime 0.2.7

Astronomical calculator for Bikram Sambat calendar based on solar and lunar positions. High-performance Nepali (Bikram Sambat) datetime library with multi-language bindings
Documentation
[package]
name = "npdatetime"
version = "0.2.7"
edition = "2024"
authors = ["Amrit Giri <amritgiri.dev@gmail.com>"]
description = "Astronomical calculator for Bikram Sambat calendar based on solar and lunar positions. High-performance Nepali (Bikram Sambat) datetime library with multi-language bindings"
license = "MIT"
repository = "https://github.com/4mritGiri/npdatetime"
keywords = ["astronomy", "calendar", "bikram-sambat", "nepali", "datetime"]
categories = ["date-and-time", "localization", "science"]

[lib]
name = "npdatetime"
crate-type = ["cdylib", "rlib"]  # cdylib for bindings, rlib for Rust usage

[dependencies]
# Core math and calculations
num-traits = "0.2"
libm = "0.2"  # Math functions for no_std support

# Serialization
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0", optional = true }

# Date/time utilities
chrono = { version = "0.4", optional = true }

# Floating point comparisons
approx = "0.5"

# Error handling
thiserror = "1.0"
lazy_static = "1.4"

# For Python bindings (optional)
pyo3 = { version = "0.21.0", features = ["extension-module"], optional = true }

# For JavaScript/WASM bindings (optional)
wasm-bindgen = { version = "0.2", optional = true }
js-sys = { version = "0.3", optional = true }

# For benchmarking
[build-dependencies]
csv = "1.3"
serde = { version = "1.0", features = ["derive"] }

[dev-dependencies]
criterion = "0.5"
assert_approx_eq = "1.1"

[features]
default = ["lookup-tables"]
std = ["chrono"]
python = ["pyo3"]
wasm = ["wasm-bindgen", "js-sys", "dep:serde", "dep:serde_json"]
serde = ["dep:serde", "dep:serde_json"]
astronomical = []
lookup-tables = []

# Profile for release builds
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
strip = true

# Benchmark configuration
[[bench]]
name = "date_conversion"
harness = false

# Example binaries
[[example]]
name = "basic_usage"
path = "examples/basic_usage.rs"

[[example]]
name = "conversion_demo"
path = "examples/conversion_demo.rs"