-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
67 lines (62 loc) · 3.83 KB
/
Copy pathCargo.toml
File metadata and controls
67 lines (62 loc) · 3.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
[package]
name = "telemetry-processor"
version = "0.1.0"
edition = "2021"
rust-version = "1.85"
license = "BUSL-1.1"
description = "Reference Rust processing component for edgecommons/edgecommons: subscribe → filter/sample/aggregate/project/script → forward (local / northbound / durable stream → Kinesis/Kafka/file)."
publish = false
# The reference Rust processor component, built on the edgecommons Rust library. It is the
# high-throughput northbound seam between southbound adapters (channel 1) and the cloud
# (channels 2/3). See docs/TELEMETRY_PROCESSOR.md in the edgecommons monorepo.
[[bin]]
name = "telemetry-processor"
path = "src/main.rs"
[features]
# Batteries-included by default: the HOST / Kubernetes binary ships with MQTT + streaming + the
# Kinesis and Parquet/AVRO file sinks + CloudWatch, so a config "just works" without recompiling.
# Two capabilities stay opt-in for hard build reasons: `greengrass` (the AWS GG IPC SDK is a
# Linux-only C-FFI crate — it would break `cargo build` on Windows/macOS; the device build opts in
# via build.sh) and `streaming-kafka` (rdkafka vendors librdkafka through cmake + a C toolchain).
default = ["standalone", "streaming", "streaming-kinesis", "streaming-file-parquet", "streaming-file-avro", "cloudwatch"]
# Runtime selection (mirrors the library): standalone = dual-broker MQTT (containers/laptops);
# greengrass = IPC (device; Linux-only build).
standalone = ["edgecommons/standalone"]
greengrass = ["edgecommons/greengrass"]
cloudwatch = ["edgecommons/cloudwatch"]
# Durable streaming targets (the `stream:<name>` route target). `streaming` alone is buffer-only;
# add a sink feature for real export. The file sink (Parquet/AVRO) lives in the edgestreamlog core.
streaming = ["edgecommons/streaming"]
streaming-kinesis = ["streaming", "edgecommons/streaming-kinesis"]
streaming-kafka = ["streaming", "edgecommons/streaming-kafka"]
streaming-file-parquet = ["streaming", "edgecommons/streaming-file-parquet"]
streaming-file-avro = ["streaming", "edgecommons/streaming-file-avro"]
# Optional second script engine, runtime-selectable per route via `scriptEngine: "lua"`. OFF by
# default so the standard build stays pure-Rust and toolchain-free (Rhai only); enable it (release
# artifacts do) to ship a binary that can also run Lua 5.4 scripts. Pulls mlua's vendored PUC Lua
# 5.4 — a C build (builds on any Linux/macOS/Windows host with a C compiler, and cross-compiles for
# aarch64 via `cross`; see docs/scripting.md).
scripting-lua = ["dep:mlua"]
[dependencies]
# The edgecommons Rust library, pinned to the `rust-lib/v0.5.0` release tag on
# edgecommons/edgecommons (a public repo — the fetch needs no credentials, in CI or locally). For
# local development against an unpushed change, add a gitignored `.cargo/config.toml` `[patch]`
# override pointing at `../core/libs/rust` (the sibling checkout) instead of editing this pin — see
# CLAUDE.md.
edgecommons = { git = "https://github.com/edgecommons/edgecommons.git", rev = "a14a3285573ef2bb6a531e1e1936c6dc40a85ef4", default-features = false }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "signal", "time", "sync"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tracing = "0.1"
anyhow = "1"
async-trait = "0.1"
smallvec = "1"
# Embedded scripting for the `script` stage + the Rhai `filter` option (always compiled in).
# `sync` makes Engine/AST/Dynamic Send+Sync (shared across route workers); `serde` converts the
# message JSON to/from a Rhai value.
rhai = { version = "1", features = ["sync", "serde"] }
# Optional Lua 5.4 engine (feature `scripting-lua`): vendored PUC Lua (C), `send` for the per-route
# worker task, `serialize` to marshal the message view. Sandboxed + instruction-budgeted at runtime.
mlua = { version = "0.10", features = ["lua54", "vendored", "serialize", "send"], optional = true }
[dev-dependencies]
tempfile = "3"