Files
hsmc/hsmc/Cargo.toml
T
swaits cb38d936dc chore: repoint URLs at git.swaits.com and bump for release
Rewrites remaining github.com / git.sr.ht references to git.swaits.com,
translating GitHub URL shapes to Gitea's (/blob/<ref>/ -> /src/branch/<ref>/,
/tree/<tag> -> /src/tag/<tag>, /actions/workflows/X -> /actions?workflow=X,
/edit/ -> /_edit/).

Left pointing at GitHub on purpose: pull-request links (PRs were not migrated)
and GitHub-only surfaces Gitea lacks (security advisories, discussions).
2026-08-31 17:58:32 -06:00

75 lines
2.7 KiB
TOML

[package]
name = "hsmc"
version.workspace = true
edition.workspace = true
license.workspace = true
authors.workspace = true
repository.workspace = true
homepage.workspace = true
description = "Hierarchical state machines (statecharts) with a declarative proc macro."
readme = "../README.md"
keywords = ["statechart", "state-machine", "hsm", "embassy", "embedded"]
categories = ["embedded", "no-std", "asynchronous", "rust-patterns"]
autoexamples = false
[features]
default = []
tokio = ["dep:tokio"]
embassy = ["dep:embassy-sync", "dep:embassy-time", "dep:embassy-futures"]
# Auto-tracing sinks — every chart emits `__chart_observe!` calls
# unconditionally; whichever of these sinks you enable is what gets
# textual log lines. Pick zero, one, or any combination — the
# observation pipeline fans out to all enabled sinks and the in-memory
# journal (below). With NO sink feature enabled, observation is fully
# elided at compile time (zero overhead).
#
# Format: `[statechart:<Name>] <verb> key=value …` (logfmt-style,
# greppable, regex-parseable). The `tracing` backend uses native
# structured fields instead of stringly key=value pairs.
trace-defmt = ["dep:defmt"]
trace-log = ["dep:log"]
trace-tracing = ["dep:tracing"]
# In-memory journal sink. When enabled, every `__chart_observe!` site
# also records a `TraceEvent` into the per-machine `JournalSink`. The
# journal is the authoritative byte-deterministic atom-by-atom record
# of chart execution; trace backends are textual renderings of the
# same vocabulary.
# Requires `alloc` (the journal grows dynamically). Off by default —
# zero overhead and no `alloc` requirement when not enabled.
journal = []
[dependencies]
hsmc-macros = { path = "../hsmc-macros", version = "0.6.1" }
heapless = "0.8"
tokio = { version = "1", features = ["sync", "time", "rt", "macros"], optional = true }
embassy-sync = { version = "0.8", optional = true }
embassy-time = { version = "0.5", optional = true }
embassy-futures = { version = "0.1", optional = true }
defmt = { version = "0.3", optional = true }
log = { version = "0.4", optional = true }
tracing = { version = "0.1", default-features = false, optional = true }
[target.'cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))'.dev-dependencies]
trybuild = "1"
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "time", "test-util"] }
[target.'cfg(target_os = "linux")'.dev-dependencies]
gungraun = "0.18"
[[example]]
name = "microwave"
required-features = ["tokio"]
[[example]]
name = "during_radio"
required-features = ["tokio"]
[[example]]
name = "embassy_full"
required-features = ["embassy"]
crate-type = ["lib"]
[[bench]]
name = "dispatch"
harness = false