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, wrapped in aEmbeddedNetworkOutputChannel. - Sources (
EmbeddedNetworkIn): oneStreamfield per incoming channel, wrapped in aEmbeddedNetworkInputChannel.
Each location’s module also has a marker type per channel end (outgoing::* and
incoming::*) implementing
EmbeddedNetworkChannel, which
describes the field’s channel end: the guarantees of the stream there (the stream sent, or the
one delivered) and the channel’s network config, which the host agrees to.
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
Codegen Options - Options controlling the Rust source emitted by
DeployFlow::generate_embedded_with_options. - 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.