Quickstart
In this tutorial, we'll walk through the basics of Hydro by building a simple dataflow that prints out the first 10 natural numbers. We'll start with a single process, then pipeline the computation, and finally distribute it across a cluster.
First you will need to install Rust. We recommend the conventional installation
method, rustup
, which allows you to easily manage and update Rust versions: Install Rust
The link in the previous line will take you to the Rust website that shows you how to
install rustup
and the Rust package manager cargo
(and the
internally-used rustc
compiler). cargo
is Rust's main development tool,
used for building, running, and testing Rust code.
We recommend using VS Code with the rust-analyzer
extension (and NOT the
Rust
extension).
Getting Started with Hydro
To get started with a new project, we'll use the Hydro template. The template comes with a simple distributed program.
cargo install cargo-generate
cargo generate gh:hydro-project/hydroflow template/hydro
# Project Name: my-example-project
cd my-example-project
After cd
ing into the generated folder, we can run tests for the included sample:
cargo test