[package]
name = "rustate"
version = "0.2.2"
edition.workspace = true
description = "A Rust implementation of statecharts with model-based testing support"
license.workspace = true
authors.workspace = true
repository.workspace = true
documentation.workspace = true
readme = "README.md"
keywords = ["statecharts", "statemachine", "fsm", "xstate", "model-based-testing"]
categories = ["data-structures", "concurrency", "development-tools::testing"]
[dependencies]
serde.workspace = true
serde_json.workspace = true
thiserror.workspace = true
uuid = { workspace = true, optional = true }
wasm-bindgen = { workspace = true, optional = true }
js-sys = { workspace = true, optional = true }
web-sys = { workspace = true, optional = true, features = [
"console", "Document", "Element", "HtmlElement",
"Node", "Window", "HtmlButtonElement", "Event"
]}
console_error_panic_hook = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }
async-trait = { workspace = true, optional = true }
[features]
default = ["uuid"]
wasm = ["wasm-bindgen", "js-sys", "web-sys", "console_error_panic_hook", "uuid/js"]
mbt = []
integration = []
integration_async = ["integration", "tokio", "async-trait"]
[lib]
crate-type = ["cdylib", "rlib"]
[[example]]
name = "traffic_light"
path = "examples/traffic_light.rs"
[[example]]
name = "hierarchical"
path = "examples/hierarchical.rs"
[[example]]
name = "model_based_testing"
path = "examples/model_based_testing.rs"
[[example]]
name = "integration_demo"
path = "examples/integration/combined_demo.rs"
required-features = ["integration"]
[package.metadata.wasm-pack.profile.release]
wasm-opt = ["-O3"]