[package]
name = "molecular-formulas"
version = "0.1.7"
edition = "2024"
authors = ["Earth Metabolome Initiative"]
license = "MIT"
repository = "https://github.com/earth-metabolome-initiative/molecular-formulas"
description = "A Rust crate for parsing, manipulating, and analyzing molecular formulas."
readme = "README.md"
keywords = ["chemistry", "molecular-formulas", "elements", "isotopes", "science"]
categories = ["science", "database"]
include = ["src/**/*", "Cargo.toml", "README.md", "LICENSE"]

[dependencies]
serde = { version = "1.0", optional = true }
elements_rs = { version = "0.2.4", features = ["serde"] }
num-traits = "0.2"
thiserror = "2.0.18"
arbitrary = { version = "1.4", optional = true, features = ["derive"] }

[dev-dependencies]
strum = {version = "0.28.0", features = ["derive"]}
criterion = "0.8.2"
csv = "1.1"
indicatif = "0.18.4"
comfy-table = "7.2.2"
serde_json = "1.0.149"

[features]
default = ["serde"]
serde = ["dep:serde"]
arbitrary = ["dep:arbitrary", "elements_rs/arbitrary"]
fuzzing = ["arbitrary"]

[lints]
workspace = true

[workspace]
members = [
	".",
	"fuzz",
]

[workspace.lints.rust]
missing_docs = "forbid"
unused_macro_rules = "forbid"
unconditional_recursion = "forbid"
unreachable_patterns = "forbid"
unused_import_braces = "forbid"
unused_must_use = "forbid"
deprecated = "deny"

[workspace.lints.rustdoc]
broken_intra_doc_links = "forbid"
bare_urls = "forbid"
invalid_codeblock_attributes = "forbid"
invalid_html_tags = "forbid"
missing_crate_level_docs = "forbid"
unescaped_backticks = "forbid"
redundant_explicit_links = "forbid"
invalid_rust_codeblocks = "forbid"

[workspace.lints.clippy]
unreadable_literal = "allow"
missing_panics_doc = "allow"
new_ret_no_self = "allow"
struct_excessive_bools = "allow"
should_panic_without_expect = "allow"
doc_markdown = "allow"
clone_on_copy = "forbid"
pedantic = { level = "deny", priority = -1 }

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

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

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