Skip to content

日本語

Welcome to Graphcal

Graphcal is a type-safe, unit-aware, Git-friendly reactive programming language for engineering calculations. It replaces spreadsheets and ad-hoc scripts with a single typed, version-controlled computation graph.

Documentation is available in English and Japanese. Use the language selector in the header to switch editions, or the link above the page title to open the same page in the other language. Code examples and the playground are shared; the playground UI remains in English.

Graphcal in Helix showing inline computed values for a rocket equation calculation

Graphcal's language server shows computed node values inline, so a plain-text calculation file feels like a live engineering worksheet.

Quick Example

The Tsiolkovsky rocket equation in Graphcal:

// `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);

Run it:

$ graphcal eval rocket.gcl
dry_mass   = 1200 kg
fuel_mass  = 2800 kg
isp        = 320 s
g0         = 9.80665 m/s^2
v_exhaust  = 3138.128 m/s
mass_ratio = 3.333333
delta_v    = 3778.221 m/s

Why Graphcal?

  • Type safety -- Dimension mismatches are caught at compile time.
  • Unit awareness -- Define physical dimensions, attach units, and convert between them. The compiler enforces dimensional consistency. No more Mars Climate Orbiter failures.
  • Reactive computation -- Define a DAG of parameters and nodes. Change an input and all dependent values update automatically.
  • Git-friendly -- Plain text .gcl files that diff and merge cleanly. No binary spreadsheets.
  • Live editor experience -- The LSP server provides inlay hints that display computed values inline, turning your editor into a live calculation sheet.

Getting Started

  • Installation


    Install Graphcal from crates.io using Cargo.

    Install Graphcal

  • Browser Playground (Experimental)


    Try alpha-stage Graphcal immediately—no installation required. Choose an example from the Examples menu and change its inputs to explore resonance, sound interference, aliasing, chaos, queueing, or delayed feedback through reactive plots. Each experiment includes suggested input changes and model assumptions.

    Open the playground

  • Interactive Tutorial


    Learn Graphcal step by step, with single-file examples you can open in the playground.

    Start the tutorial

  • Language Reference


    Formal documentation of all language features.

    Language reference

  • CLI Reference


    Complete command-line interface documentation.

    CLI commands

  • Tenax Integration


    Compile once and serve typed engineering models over persistent Arrow IPC.

    Connect Graphcal to Tenax

  • Editor Setup


    Install the VS Code extension, or set up Zed/Neovim with live inlay hints.

    Editor setup