11 releases (5 breaking)

0.5.2 Feb 2, 2024
0.5.0 Oct 11, 2023
0.3.0 Jul 4, 2023

#408 in Development tools

Download history 1/week @ 2023-11-04 11/week @ 2023-11-11 4/week @ 2023-11-18 29/week @ 2023-11-25 10/week @ 2023-12-02 9/week @ 2023-12-09 18/week @ 2023-12-23 2/week @ 2023-12-30 9/week @ 2024-01-13 27/week @ 2024-01-20 256/week @ 2024-01-27 269/week @ 2024-02-03 131/week @ 2024-02-10 412/week @ 2024-02-17

1,070 downloads per month
Used in 2 crates (via hydroflow_plus)

Apache-2.0

1.5MB
21K SLoC

Hydroflow

Hydroflow is a small language and compiler for low-latency dataflow programs, written in Rust. Hydroflow serves as the runtime library for the Hydro language stack, which is under development as a complete compiler stack for distributed programming languages.

Hydroflow is designed with two use cases in mind:

  • Expert developers can program directly in the Hydroflow language to build individual components that can interoperate in a distributed program or service.
  • Higher levels of the Hydro stack will offer higher-level abstractions and DSLs, and treat Hydroflow as a compiler target.

Hydroflow is targeted at supporting the following unique features:

  1. A type system that helps developers reason about progress and consistency guarantees in a distributed program. This includes an emphasis on lattice types that can allow for consistent outcomes in the face of network messages that may be interleaved, reordered, batched, and resent.
  2. A dataflow programming model, capturing the message- and data-driven nature of many distributed services.
  3. Extremely low-latency handling of asynchronously-arriving data/messages, via aggressive exploitation of Rust's monomorphization techniques.
  4. Dataflow optimizations, both to optimize single-node Hydroflow flows, and to enable distributed optimizations across multiple flows.

Hydroflow's language—the Hydroflow surface syntax—is embedded in Rust, which compiles Hydroflow code to high-efficiency machine code. As the lowest level of the Hydro stack, Hydroflow requires some knowledge of Rust to use.

The most recent release of the Hydroflow Book docs are online, providing documentation and numerous annotated examples.

You can also check out the Hydroflow Playground to see Hydroflow's surface syntax in action!

Dependencies

~8–25MB
~340K SLoC