build only.Expand description
“Embedded” deployment backend for Hydro.
Instead of compiling each location into a standalone binary, this backend generates
a Rust source file containing one function per location. Each function returns a
dfir_rs::scheduled::graph::Dfir that can be manually driven by the caller.
This is useful when you want full control over where and how the projected DFIR code runs (e.g. embedding it into an existing application).
§Networking
Process and cluster networking (o2o, o2m, m2o, m2m) is supported. When a location has network
sends or receives, the generated function takes additional network_out and
network_in parameters whose types are generated structs with one field per
network port (named after the channel). Network channels must be named via
.name() on the networking config.
- Sinks (
EmbeddedNetworkOut): oneFnMut(..)field per outgoing channel. - Sources (
EmbeddedNetworkIn): oneStreamfield per incoming channel.
The exact field types depend on the channel’s serialization:
- With
bincodeserialization, Hydro serializes to bytes, so sinks areFnMut(Bytes)and sources areStream<Item = Result<BytesMut, io::Error>>. - With
embeddedserialization, the raw element typeTflows across the channel, so sinks areFnMut(T)and sources areStream<Item = T>(with no transportResult— the caller decides how to handle faults).
Channels keyed by a cluster member (demux / cluster send) additionally carry a
TaglessMemberId alongside the payload in these types.
The caller is responsible for wiring these together (e.g. via in-memory channels, sockets, etc.). External ports are not supported.
Structs§
- Embedded
Instantiate Env - Collected embedded input/output registrations, keyed by location.
- Embedded
Node - A trivial node type for embedded deployment. Stores a user-provided function name.
Enums§
- Embedded
Deploy - Marker type for the embedded deployment backend.