Fork is a numerical bifurcation continuation software application with both a web UI and a Node.js CLI, supporting the analysis of smooth finite-dimensional maps and systems of ordinary differential equations. The goal is to support all popular mobile and desktop devices.
Fork is developed in my spare time and incentivized both by my personal use of the software and by Patreon support. People who have supported Fork on Patreon are listed below.
- Christopher Hitzel
- Julien Brenneck
- Jacob Price
Fork is a 4-part monorepo: a Rust core, WASM bindings, a Node.js CLI, and a web UI. The core is the numerical engine, while the CLI and web app provide different user interfaces on top of the same algorithms.
crates/fork_core: Pure Rust numerical engine. It includes a small equation language: user-provided expressions are parsed into an AST, compiled into stack-based bytecode, and executed by a tiny VM againstf64values or dual numbers for automatic differentiation. This feeds Newton solvers, continuation, stability, and collocation routines. The core is UI-agnostic and designed to be deterministic, testable, and reusable across frontends.crates/fork_wasm: WebAssembly bindings that wrap the core for JavaScript consumers. This lets the CLI and web UI share the exact same numerical engine and results.cli: Interactive Node.js CLI built on the WASM bindings. It exposes the core algorithms in a text-based workflow.web: Vite + React web UI that consumes the WASM bindings and renders results in the browser.
Rust and WebAssembly were chosen so the performance-critical numerical kernels and automatic differentiation live in one place, and the browser and CLI run identical continuation logic without a separate JavaScript reimplementation.
A checkmark denotes that support for the bifurcation type has been implemented. Codim-2 support currently means detection on codim-1 curves (not full codim-2 continuation).
- Codimension 0
- Equilibrium (Fixed Point)
- Periodic Orbit
- Codimension 1
- Saddle-Node (Fold)
- Period-Doubling (Flip)
- Neimark-Sacker
- Codimension 2
- Cusp
- Bogdanov-Takens
- Chenciner
- Codimension 0
- Equilibrium
- Periodic Orbit
- Codimension 1
- Andronov-Hopf
- Homoclinic to Saddle-Equilibrium
- Homoclinic to Saddle-Focus
- Homoclinic to Saddle-Periodic-Orbit
- Saddle-Node (Fold)
- Saddle-Node of Periodic Orbits (LPC: Limit Point of Cycles)
- Codimension 2
- Bautin Point / Generalized Andronov-Hopf
- Bogdanov-Takens
- Saddle-to-Saddle-Focus
- Zero-Hopf
- Double Hopf
- Resonance 1:1 (Neimark-Sacker)
- Resonance 1:2 (Neimark-Sacker)
- Resonance 1:3 (Neimark-Sacker)
- Resonance 1:4 (Neimark-Sacker)
- Shilnikov-Hopf
Fork uses Plotly to render trajectories, bifurcation diagrams, and other visualizations.
Fork ships as a Rust/WASM core, a Node.js CLI, and a web UI. The CLI and web app each have their own dependency setup.
Build the Rust core with:
cargo buildBuild the WASM bindings for the CLI with:
cd crates/fork_wasm
wasm-pack build --target nodejsRun the CLI with:
cd cli
npm install
npm startBuild the WASM bindings for the web UI with:
cd crates/fork_wasm
wasm-pack build --target web --out-dir pkg-webRun the web UI locally with:
cd web
npm install
npm run devCreate a production build of the web UI with:
cd web
npm run buildDeploy builds (including Vercel) need the Rust toolchain and wasm-pack to generate pkg-web. See web/vercel.json for the hosted build configuration.