flowrs-engine/crates/flowrs-live/Cargo.toml
flowRS fd958c0547 flowRS engine, cut from flowRS 3451b065
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 19:04:39 -05:00

70 lines
4 KiB
TOML

[package]
name = "flowrs-live"
version.workspace = true
edition.workspace = true
publish.workspace = true
rust-version.workspace = true
authors.workspace = true
license.workspace = true
description = "Live data sources for flowRS: SEGGER RTT (up and down channels), defmt decoded against the firmware ELF, an ELF-symbol memory sampler, maker serial telemetry (Teleplot, Arduino Serial Plotter, CSV), and sans-IO decoders for biosignal devices with open wire protocols (OpenBCI Cyton and Ganglion, Muse, g.tec Unicorn, BITalino, Polar H10) with synthetic and EDF/BDF/XDF playback sources. One protocol implementation over a memory trait, so a twin and a board stream the same way."
[lib]
crate-type = ["rlib"]
[dependencies]
# The one implementation of sin, exp, ln, atan2, powf and the rest, the same bits in the
# browser and in a generated program (crates/flowrs-math).
flowrs-math = { path = "../flowrs-math" }
serde = { workspace = true }
# The typed MCU link, whose status this crate reports (src/link.rs). Zero dependencies.
flowrs-transport = { path = "../flowrs-transport" }
# defmt's interned strings are symbol NAMES in the ELF, written as JSON. Plain serde_json:
# defmt-decoder itself is not used because it switches on serde_json's
# `arbitrary_precision`, which cargo would then turn on for every crate in the workspace
# build — and that feature breaks internally tagged enums that carry numbers.
serde_json = { workspace = true }
# ELF symbols, segments and sections. Pure Rust, so the IDE reads a firmware file in the
# browser. 0.39 is the version probe-rs already brings into the lock.
object = { version = "0.39", default-features = false, features = ["read_core", "elf", "std"] }
# DWARF: a global's address and type, for the symbol sampler. Pure Rust.
gimli = { version = "0.34", default-features = false, features = ["read", "std"] }
# defmt's own format-string grammar, the crate defmt-decoder parses with. It is already in
# the lock (through defmt), so decoding here and decoding there read a format the same way.
defmt-parser = "=1.1.0"
# defmt-decoder prints f32/f64 arguments with ryu; matching its text means the same digits.
ryu = "1"
# The synthetic biosignal source computes its sines with libm so that the browser and a
# native build produce the same bits (the scope's golden hashes depend on it). Already in
# the lock through dpb-plot.
libm = "0.2.16"
# MCAP sessions (src/mcap.rs): the session writer, the reader and the message kinds live in
# flowrs-capture's mcap module; this crate maps live streams onto them.
flowrs-capture = { path = "../flowrs-capture" }
# A `Timeseries` recorded as rows (the struct both tiers compile).
flowrs-schemas = { path = "../flowrs-schemas" }
# Native-only: a real serial port, and probe-rs for a board on a debug probe.
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
serialport = { version = "4", optional = true }
# LSL discovery and descriptions (`lsl` feature): labstream, MIT, LSL protocol 1.10. Not
# rlsl or lsl-core, which are GPL.
labstream = { version = "=0.1.2", optional = true }
labstream-net = { version = "=0.1.2", optional = true }
probe-rs = { version = "0.32", optional = true }
# Where a probe is plugged in (its USB port path), which probe-rs does not report: the lease
# identity of a probe with no unique serial number. 0.2 is the version probe-rs brings.
nusb = { version = "0.2", optional = true }
# The lease identity rule and the operator's device registry (`reach`), for a probe.
flowrs-instruments = { path = "../flowrs-instruments", optional = true }
[features]
default = []
# Native serial ports (`serial`), Teleplot's UDP listener is std::net and needs no feature.
serial = ["dep:serialport"]
# A board behind a debug probe, through probe-rs 0.32.
probe = ["dep:probe-rs", "dep:nusb", "dep:flowrs-instruments"]
lsl = ["dep:labstream", "dep:labstream-net"]
# Features of the full repository whose crates this snapshot does not carry: the code they
# guard stays off.
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(feature, values("twin"))'] }