A crate for creating and evaluating executable directed graphs at runtime. In other words, gantz allows users to compose programs described by interconnected nodes on the fly.
Gantz is inspired by a desire for a more flexible, high-performance, open-source alternative to graphical programming environments such as Max/MSP, Touch Designer, Houdini and others. Named after gantz graf.
NOTE: gantz is currently a research project and is not ready for any kind of real-world use.
Gantz allows for constructing executable directed graphs by composing together Nodes.
Nodes are a way to allow users to abstract and encapsulate logic into smaller, re-usable components, similar to a function in a coded programming language.
Every Node is made up of the following:
- Any number of inputs, where each input is some value.
- Any number of outputs, where each output is some value.
- An expression or function that takes the inputs as arguments and returns the outputs in a list.
Graphs describe the composition of one or more nodes. A graph may contain one or more nested graphs represented as nodes, forming the main method of abstraction within gantz.
Graphs are compiled to steel, an embeddable scheme written in Rust designed for embedding in Rust applications. This allows for fast dynamic evaluation, while providing the option to specialise node implementations using native Rust functions where necessary.
See the gantz_core/tests
directory for some very basic, early proof-of-concept
tests.
Contains the core traits and items necessary for any gantz implementation. The current approach heavily revolves around steel code generation, however this crate may get generalised in the future to allow for more easily targeting other languages.
- A simple function for creating nodes from steel expressions.
- Allow for handling generics and trait objects within custom nodes.
-
Serialize
andDeserialize
for nodes and graphs via serde and typetag. - Project workspace creation.
- Push evaluation through the graph.
- Pull evaluation through the graph.
- Simultaneous push and pull evaluation from multiple nodes.
- Stateless node codegen.
- Stateful node codegen.
- Implement
Node
forGraph
. - Conditional evaluation #21.
- Evaluation boundaries #22.
- Dynamic node I/O configurations #31.
- A derive macro for generating node types from existing Rust
fn
s.
After each of these goals are met, the plan is to use this foundation to create some higher-level tooling along the lines of the following:
- A GUI for creating, editing and saving graphs and custom nodes at runtime.
- Node packaging and sharing tools, likely built on cargo and crates.io.
- A suite of nodes providing an interface to nannou's cross-platform support
for a wide range of protocols and I/O:
- Windowing and input events.
- Phasers and signals.
- Audio input, output, processing and device management.
- 2D/3D geometry, graphics and shaders.
- Video input and processing.
- Networking (UDP and TCP).
- OSC.
- Lighting, lasers & control: DMX (via sACN), CITP (& CAEX), Ether-Dream.
- GPU general compute.
- General file reading and writing.
Licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contributions
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.