Skip to main content

Module embedded

Module embedded 

Source
Available on crate feature 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-to-process (o2o) networking 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): one FnMut(Bytes) field per outgoing channel.
  • Sources (EmbeddedNetworkIn): one Stream<Item = Result<BytesMut, io::Error>> field per incoming channel.

The caller is responsible for wiring these together (e.g. via in-memory channels, sockets, etc.). Cluster networking and external ports are not supported.

Structs§

EmbeddedInstantiateEnv
Collected embedded input/output registrations, keyed by location.
EmbeddedNode
A trivial node type for embedded deployment. Stores a user-provided function name.

Enums§

EmbeddedDeploy
Marker type for the embedded deployment backend.