tedge-dot — Rust implementation
One of the two implementations, packaged as tedge-dot-rs (the default package is the C
build, tedge-dot-c; pick this one for the features only it has). A cargo workspace:
the SDK (runtime, Connector trait, config model, decode helpers), one crate
per protocol module, the conformance harness, and the tedge-dot binary.
| Path | Contents |
|---|---|
| crates/sdk | tedge-dot-sdk — runtime, Connector trait, config model, decode helpers, golden vectors |
| crates/connector-* | one crate per protocol module (modbus, opcua, canbus, canopen, profibus, snmp) |
| crates/ot-conformance | the contract conformance harness (schema, decode vectors, behavioural checks) |
| src/main.rs | the binary: run service plus the read/write/describe CLI |
| vendor/ | patched copies of upstream crates (see the TEDGE-DOT-PATCH.md in each) |
The C implementation is its maintained peer: same contract, same
system tests, its own package (tedge-dot-c). Differences between the two are
listed in
impl/c/README.md.
Building and testing
Section titled “Building and testing”Everything runs from the repository root, where the shared connectors/,
cloud/, flows/, demo/ and packaging/ trees live; cargo is pointed here
with --manifest-path rather than by changing directory, so the relative paths
the suites and conformance manifests use keep resolving.
just test # unit + integration + property testsjust lint # clippy -D warningsjust conformance modbus # contract conformance suite (no hardware or broker)just test-e2e modbus # Dockerised MQTT e2e suitejust build # cross-compile + package (goreleaser, this package only)
# or directlycargo test --manifest-path impl/rust/Cargo.toml --workspaceexport TEDGE_DOT_POINT_LIBRARY_PATH=$PWD/demo/points.d # the demo point lists (a package installs them)cargo run --manifest-path impl/rust/Cargo.toml -- read -c demo/config/modbus.tomlProtocol modules are cargo features on the binary (modbus, opcua, canbus,
canbus-fd, canopen, profibus, snmp); see Cargo.toml. profibus is
excluded from the released package because its serial dependency has a native
libudev build script that does not cross-compile with cargo-zigbuild — build it
from source on Linux, or use tedge-dot-c, which ships it.
The SDK and the Connector trait are specified in
doc/sdk/connector-sdk.md; the testing strategy
is in doc/testing.md.