[package]
name = "scxml"
version = "0.2.0"
edition = "2024"
authors = ["Gnomes"]
license = "MIT OR Apache-2.0"
description = "W3C SCXML statechart library — parse, validate, export, and simulate Harel statecharts. Framework-agnostic, WASM-ready, rkyv zero-copy."
readme = "README.md"
repository = "https://github.com/GnomesOfZurich/scxml"
homepage = "https://github.com/GnomesOfZurich/scxml"
documentation = "https://docs.rs/scxml"
keywords = ["scxml", "statechart", "state-machine", "workflow", "xstate"]
categories = ["data-structures", "parser-implementations", "wasm", "visualization", "simulation"]
rust-version = "1.87"
exclude = ["demo/", "pkg/", "target/", ".github/", ".claude/"]
[lib]
crate-type = ["cdylib", "rlib"]
[features]
default = ["xml", "json", "validate", "export"]
xml = ["dep:quick-xml"]
json = ["dep:serde_json"]
validate = []
export = []
dot = ["export"]
flatten = ["export"]
rkyv = ["dep:rkyv", "compact_str/rkyv"]
xstate = ["dep:serde_json"]
wasm = ["dep:wasm-bindgen", "dep:js-sys", "xml", "json", "validate", "export"]
[dependencies]
compact_str = { version = "0.9.0", features = ["serde"] }
serde = { version = "1.0.228", features = ["derive"] }
thiserror = "2.0.18"
quick-xml = { version = "0.39.3", optional = true }
serde_json = { version = "1.0.149", optional = true }
rkyv = { version = "0.8.16", optional = true }
wasm-bindgen = { version = "0.2.121", optional = true }
js-sys = { version = "0.3.98", optional = true }
[dev-dependencies]
criterion = { version = "0.8.2", features = ["html_reports"] }
proptest = "1.11.0"
serde_json = "1.0.149"
pretty_assertions = "1.4.1"
[[bench]]
name = "statechart"
harness = false
[[bench]]
name = "rkyv_bench"
harness = false
required-features = ["rkyv"]