Skip to content

Latest commit

 

History

6,205 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build and Test codecov License: MIT macOS Linux Windows Raspberry Pi

flow — Dataflow Programming System

flow is a system for defining, compiling and running parallel dataflow programs. Flows are defined declaratively as graphs of connected processes — using a visual editor or text files — compiled to a manifest, and executed by a runner. The suite of tools (runner, debugger, remote executor) work together over the network, discovering each other via mDNS for distributed flow execution.

Install everything with a single command

curl -sL https://github.com/andrewdavidmackenzie/flow/releases/latest/download/install-flow.sh | bash

Your First Flow

Here's a flow that generates the fibonacci sequence:

Fibonacci flow

This flow has two functions connected together:

  • add — a library function from flowstdlib that adds two numbers
  • stdout — a context function provided by the runner for printing to the terminal

The add function has two inputs (i1 and i2) with initializers: i1 is set to 0 and i2 to 1 at startup (shown as "once" — they're only set once).

Three connections carry data between functions:

  • add's output feeds back to its own i2 input (the next value)
  • The previous i2 value feeds back to i1 (a feedback connection)
  • add's output also flows to stdout, which prints each value

The output of add includes the input values, enabling feedback of the previous value. The flow runs until integer overflow produces no output.

flowc -r flowrcli flowr/examples/fibonacci    # compile and run

The first flow section of the book walks you through it.

The Flow Tool Suite

flowc — Flow Compiler

Compiles flow definitions (TOML/YAML/JSON) into flow manifests, compiles libraries and their WASM implementations, and generates SVG flow visualizations.

flowc -d -g -O my_flow/       # compile with debug symbols, graphs, optimization
flowc -c -r flowrcli my_flow/ # compile and run with flowrcli
flowc flowstdlib               # compile the standard library

flowrcli — Command Line Runner

Runs compiled flows from the terminal. Provides context functions for stdio, file I/O, and image operations. Supports native and WASM execution modes.

flowrcli manifest.json         # run a compiled flow
flowrcli -n manifest.json      # native implementations only
flowrcli --debugger manifest.json  # start with debug server

flowrdb — Flow Debugger

Command-line debugger client that connects to a running flow (via flowrcli or flowrgui with --debugger). Step through execution, set breakpoints, inspect function state, and view the process tree.

flowrdb                        # discover and connect via mDNS
flowrdb --address localhost:1234  # connect directly

flowrgui — Graphical Runner

GUI application for running flows with visual I/O — image display, interactive stdin, and a built-in graphical debugger with state diagrams, breakpoints, and function inspection.

Fibonacci in flowrgui


flowedit — Visual Flow Editor

WYSIWYG editor for creating and editing flow definitions. Drag-and-drop process nodes, draw connections, edit properties, and compile directly from the editor.

flowedit editing mandlebrot

flowedit                       # start with empty canvas
flowedit path/to/root.toml    # open existing flow

Standard Library

flowstdlib provides pre-built functions and flows for common operations: math, string formatting, control flow, data manipulation, matrix operations, and more. Install it with:

curl -sL https://github.com/andrewdavidmackenzie/flow/releases/latest/download/install-flowstdlib.sh | bash

Platform Support & Packages

Platform Binary Archive Native Installer
Linux x86_64 .tar.gz .deb, .AppImage
Linux aarch64 .tar.gz .deb, .AppImage
Linux armv7 (Raspberry Pi) .tar.gz .deb
macOS aarch64 (Apple Silicon) .tar.gz .dmg
Windows x86_64 .zip .exe installer
Windows ARM .zip .exe installer

All packages are available on the releases page.

Other install methods

# Install specific version
curl -sL https://github.com/andrewdavidmackenzie/flow/releases/download/v1.2.0/install-flow.sh | bash

# Via cargo-binstall (binaries only, no flowstdlib)
cargo binstall flowc
cargo binstall flowr

Building from Source

make config   # install dependencies
make          # build everything (flowstdlib WASM compilation takes a while first time)
make test     # run all tests

See building flow for details.

Documentation

The flow book covers:

Example: Mandelbrot Set

The mandelbrot example renders a monochrome fractal using parallel dataflow execution:

Mandelbrot set

Contributing

See the contributing guide.

License

MIT — see LICENSE.

About

Exploration of a data-flow programming paradigm

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

39 stars

Watchers

2 watching

Forks

Releases

Sponsor this project

Used by

Contributors

Languages