Warning
Graphcal is under active development. Expect breaking changes and bugs.
A type-safe, unit-aware, Git-friendly reactive programming language for engineering calculations.
Graphcal is for engineers who want more confidence than spreadsheets and ad-hoc scripts provide. Write plain-text calculation graphs, let the compiler check types and physical dimensions, and see dependent values update when inputs change.
The language server shows computed values inline, turning a text file into a live engineering worksheet.
This example calculates rocket delta-v. Velocity and Acceleration are prelude dimensions.
param dry_mass: Mass = 1200.0 kg;
param fuel_mass: Mass = 2800.0 kg;
param isp: Time = 320.0 s;
const node g0: Acceleration = 9.80665 m/s^2;
node v_exhaust: Velocity = @isp * @g0;
node mass_ratio: Dimensionless = (@dry_mass + @fuel_mass) / @dry_mass;
node delta_v: Velocity = @v_exhaust * ln(@mass_ratio);
graphcal eval rocket.gcl
# delta_v = 3778.220768 m/sTry the example in the browser playground without installing anything.
- Type- and unit-safe: dimensional mistakes such as
km + kgare rejected at compile time. - Reactive: changing a parameter recomputes its dependents.
- Git-friendly:
.gclfiles are plain text and diff cleanly. - Engineering-focused: build reusable computation graphs with dimensions, units, assertions, and visualization.
- Editor-friendly: the LSP provides diagnostics, references, rename, and inline computed values.
Install the CLI with Rust:
cargo install graphcal --lockedSave the example above as rocket.gcl, then run:
graphcal eval rocket.gcl
# Try a different input:
graphcal eval rocket.gcl --set 'isp=450.0 s'For the full CLI, see the CLI reference. For a guided introduction, start with the tutorial.
- VS Code: install the Graphcal extension.
- Zed: use the Zed extension as a development extension.
- Neovim / Helix: use the tree-sitter grammar with
graphcal lsp.
See the editor setup guide for details.
- Numbat — dimensions as types, units as values
- Gleam — unified type declarations
- marimo — reactive graphs in plain-text files
- Sguaba — typed coordinate frames
Licensed under either the MIT License or Apache License, Version 2.0, at your option.
