Graphitect
A node editor for code. Functions show up as cards, and wiring them together writes a program in the project's own language.
Nodes
Graphitect is language agnostic: a function with an
@node comment becomes a card, whether it's Rust, Python, Go, TypeScript, C# or C++.The graph file
The graph is saved as
main.gph, a short text file. Editing a card changes that file, and editing the file updates the cards.Running
Run keeps the program loaded, so a changed value or wire runs again without a rebuild. Each card shows whether it ran, and the error if it failed.
Output
Ctrl+S writes plain source that builds with the project's toolchain and doesn't depend on Graphitect. Card values become command-line flags.
How it works
1. Mark a functionsrc/lib.rs
// @node repeat(text: text, times: integer = 3) -> text
pub fn repeat(text: &str, times: i64) -> String {
vec![text; times as usize].join(" ")
}
2. Wire the cardsmain.gph
word = shout("hey")
line = repeat(word, times: 3)
say(line)
3. Save to get the Rust codemain_gph.rs
fn main() {
let word = toy::shout("hey");
let line = toy::repeat(&word, 3);
toy::say(&line);
}
Or Python codemain_gph.py
import toy
def main():
word = toy.shout("hey")
line = toy.repeat(word, 3)
toy.say(line)
Rust, Tauri 2 and WebAssembly, drawn with Skia. Windows, pre-release.