# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
rust-version = "1.87"
name = "scxml"
version = "0.1.0"
authors = ["Gnomes"]
build = false
exclude = [
    "demo/",
    "pkg/",
    "target/",
    ".github/",
    ".claude/",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "W3C SCXML statechart library — parse, validate, export, and simulate Harel statecharts. Framework-agnostic, WASM-ready, rkyv zero-copy."
homepage = "https://github.com/GnomesOfZurich/scxml"
documentation = "https://docs.rs/scxml"
readme = "README.md"
keywords = [
    "scxml",
    "statechart",
    "state-machine",
    "workflow",
    "xstate",
]
categories = [
    "data-structures",
    "parser-implementations",
    "wasm",
    "visualization",
    "simulation",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/GnomesOfZurich/scxml"

[features]
default = [
    "xml",
    "json",
    "validate",
    "export",
]
dot = ["export"]
export = []
flatten = ["export"]
json = ["dep:serde_json"]
rkyv = [
    "dep:rkyv",
    "compact_str/rkyv",
]
validate = []
wasm = [
    "dep:wasm-bindgen",
    "dep:js-sys",
    "xml",
    "json",
    "validate",
    "export",
]
xml = ["dep:quick-xml"]
xstate = ["dep:serde_json"]

[lib]
name = "scxml"
crate-type = [
    "cdylib",
    "rlib",
]
path = "src/lib.rs"

[[test]]
name = "edge_cases"
path = "tests/edge_cases.rs"

[[test]]
name = "examples"
path = "tests/examples.rs"

[[test]]
name = "proptest_invariants"
path = "tests/proptest_invariants.rs"

[[test]]
name = "rkyv_roundtrip"
path = "tests/rkyv_roundtrip.rs"

[[test]]
name = "roundtrip"
path = "tests/roundtrip.rs"

[[test]]
name = "w3c_subset"
path = "tests/w3c_subset.rs"

[[test]]
name = "xstate"
path = "tests/xstate.rs"

[[bench]]
name = "rkyv_bench"
path = "benches/rkyv_bench.rs"
harness = false
required-features = ["rkyv"]

[[bench]]
name = "statechart"
path = "benches/statechart.rs"
harness = false

[dependencies.compact_str]
version = "0.9.0"
features = ["serde"]

[dependencies.js-sys]
version = "0.3.95"
optional = true

[dependencies.quick-xml]
version = "0.39.2"
optional = true

[dependencies.rkyv]
version = "0.8.15"
optional = true

[dependencies.serde]
version = "1.0.228"
features = ["derive"]

[dependencies.serde_json]
version = "1.0.149"
optional = true

[dependencies.thiserror]
version = "2.0.18"

[dependencies.wasm-bindgen]
version = "0.2.118"
optional = true

[dev-dependencies.criterion]
version = "0.8.2"
features = ["html_reports"]

[dev-dependencies.pretty_assertions]
version = "1.4.1"

[dev-dependencies.proptest]
version = "1.11.0"

[dev-dependencies.serde_json]
version = "1.0.149"
