[package]
name = "ironmark"
version = "1.11.4"
edition = "2024"
description = "Fast Markdown to HTML parser written in Rust with WebAssembly bindings"
license = "MIT"
authors = ["ph1p"]
repository = "https://github.com/ph1p/ironmark"
homepage = "https://github.com/ph1p/ironmark"
documentation = "https://docs.rs/ironmark"
keywords = ["markdown", "parser", "html", "commonmark", "wasm"]
categories = ["parsing", "text-processing", "wasm"]
exclude = [
  "playground/*",
  "benchmark/*",
  "tests/*",
  "wasm/*",
  "package.json",
  "pnpm-lock.yaml",
  ".releaserc.cjs",
  ".npmignore",
  ".github/*",
  "node_modules/*",
]

[[bin]]
name = "ironmark"
path = "src/bin/ironmark.rs"
required-features = ["cli"]

[lib]
crate-type = ["staticlib", "rlib"]

[features]
serde = ["dep:serde"]
cli = []
# Enable md4c as a benchmark competitor (requires system md4c: brew install md4c)
bench-md4c = []

[dependencies]
compact_str = { version = "0.8", features = ["serde"] }
memchr = "2"
rustc-hash = "2"
smallvec = { version = "1", features = ["union"] }
serde = { version = "1", features = ["derive"], optional = true }

[workspace]
members = ["wasm"]

[build-dependencies]

[dev-dependencies]
comrak = { version = "0.36", default-features = false }
criterion = { version = "0.5" }
markdown = "1"
markdown-it = "0.6"
pulldown-cmark = "0.13"
serde = { version = "1", features = ["derive"] }
serde_json = "1"

[[bench]]
name = "parse"
path = "benchmark/parse.rs"
harness = false

[profile.release]
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"
strip = true

[profile.release-wasm]
inherits = "release"
opt-level = 3
