Skip to content

refactor(sinktools): remove sinktools #2653

@MingweiSamuel

Description

@MingweiSamuel

The new dfir_pipes trait subsumes most of the short-lived sinktools crate's functionality. Some usage remains:

This crate is deeply integrated across the workspace. Let me give a clear summary of the dependencies:

The sinktools crate is used by 4 other crates with actual source code dependencies (not just changelogs):

1. dfir_rs (core runtime)

  • Re-exports sinktools as a public dependency in src/lib.rs
  • Uses sinktools::for_each in src/util/simulation.rs

2. hydro_lang (language/compiler)

  • Uses sinktools::demux_map_lazy::LazyDemuxSink, sinktools::lazy::{LazySink, LazySource}, sinktools::lazy_sink_source::LazySinkSource in deploy runtime files
  • Uses sinktools::map(...) in deploy runtime code generation (via q!() macros)
  • Uses sinktools::demux_map_lazy::<_, _, _, _>(...) in containerized deploy code gen
  • Uses __root_dfir_rs::sinktools::for_each(...) in compiled embedded output (compile/embedded.rs)
  • Uses sinktools::lazy::LazySink in deploy graph containerized

3. hydro_deploy_integration

  • Uses sinktools::demux_map::DemuxMap type alias for BufferedDrain
  • Uses sinktools::demux_map(...) to create demuxers for connected sinks

4. benches

  • Uses dfir_rs::sinktools::{SinkBuild, SinkBuilder, ToSinkBuild, for_each} in arithmetic, identity, and reachability benchmarks

This crate cannot be removed. It provides fundamental sink adaptor infrastructure (for_each, map, demux_map, demux_map_lazy, lazy sink/source, lazy_sink_source, SinkBuild/SinkBuilder) that is deeply woven into:

  • The core DFIR runtime's output handling
  • The Hydro language compiler's code generation for sink outputs
  • The deployment infrastructure's demuxing of connections
  • Performance benchmarks

Removing it would require either rewriting all this functionality inline into each consuming crate or finding an equivalent external crate — neither of which is a simple removal.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions