59 breaking releases

0.142.0 Sep 28, 2023
0.140.0 Sep 28, 2023
0.103.0 Jul 31, 2023
0.95.0 Mar 12, 2023
0.1.0 Jan 29, 2018

#799 in WebAssembly

Download history 154/week @ 2023-10-26 21/week @ 2023-11-02 10/week @ 2023-11-09 97/week @ 2023-11-16 131/week @ 2023-11-23 241/week @ 2023-11-30 9/week @ 2023-12-07 86/week @ 2023-12-14 168/week @ 2023-12-21 6/week @ 2023-12-28 75/week @ 2024-01-04 10/week @ 2024-01-11 59/week @ 2024-01-18 117/week @ 2024-01-25 159/week @ 2024-02-01 91/week @ 2024-02-08

427 downloads per month
Used in flowide

MIT license

450KB
10K SLoC

flowc

flowc is the "compiler and linker" for flows and flow libraries, although it is not very similar to what you might be familiar with as a compiler or linker.

It is part of the overall flow project (README.md).

It loads flow definition files, and builds the flow hierarchy reading from referenced flows/functions and library references, and builds the flow in memory.

Then it connects all functions via data flows through the hierarchy and removes most of the flow structure leaving a "network of functions" which it then optimizes (removing unused functions and connections).

It checks that types match and required connections exist.

It also checks for some illegal or cases that would prove problematic at runtime (specific types of "loops" or contention for a connection)

Lastly it generates a manifest describing the flow, which can be executed by flowr.

It then may (depending on the command line options used) invoke flowr (using cargo to ensure it is up to date and built).

It is structured as a library with a thin CLI wrapper around it that offers command line arguments and then uses the library to compile and optionally run the compiled flow.

flowrclib

This library contains most of the compilation and linking logic for flowc.

features

These are the conditionally compiled features of the flowc crate:

  • default - The "debugger" feature is enabled by default
  • debugger - feature to add the debugger

Dependencies

~28–40MB
~681K SLoC