Skip to content

Building from source

Anand edited this page Oct 14, 2026 · 1 revision

You only need this to change Whittle itself. To just use it, see Installation.

What you need

To build Install
The web app Node.js 22 or newer
The server Node.js, plus Rust (stable)
The desktop app Node.js, Rust, and the Tauri prerequisites for your system

Tauri prerequisites in short:

  • Windows: Visual Studio Build Tools with Desktop development with C++, and WebView2 (included in Windows 10/11).
  • macOS: xcode-select --install.
  • Debian/Ubuntu: sudo apt install libwebkit2gtk-4.1-dev build-essential curl wget file libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev.
  • Fedora: sudo dnf install webkit2gtk4.1-devel openssl-devel curl wget file libappindicator-gtk3-devel librsvg2-devel and sudo dnf group install "c-development".

Get the code

git clone https://github.com/anand34577/whittle.git
cd whittle
npm ci

Web app

npm run dev          # http://localhost:5173 with hot reload
npm run build        # production build in apps/web/dist
npm run preview      # serve the build at http://localhost:4173

Server

npm run build
cargo run --release --manifest-path apps/server/Cargo.toml   # http://localhost:8080, data in ./data

Run it from the repository root: it serves the web app from apps/web/dist (change with WHITTLE_WEB). Settings are environment variables (Configuration); for example, WHITTLE_AUTH=none cargo run --manifest-path apps/server/Cargo.toml runs without sign-in.

Desktop app

cd apps/desktop
npx tauri dev        # a development window
npx tauri build      # installers for your system, in src-tauri/target/release/bundle

Tests

Command Checks
npm run typecheck TypeScript
npm test Unit and geometry tests (runs the real OpenCascade engine in Node)
cd apps/server && cargo test Server API tests on SQLite; set WHITTLE_TEST_DATABASE_URL=postgres://… to run them on PostgreSQL
cd apps/desktop/src-tauri && cargo test --lib Desktop shell
node tests/e2e/smoke.mjs http://localhost:4173/ Browser test of the core flow (also features.mjs; server.mjs against a fresh server). Needs Chrome or Edge; set BROWSER_CHANNEL=chrome or msedge

How it fits together

Folder What
packages/core Document model, unit-aware formulas, undo history, the .whittle file format
packages/kernel Geometry: OpenCascade (WebAssembly) in a Web Worker, rebuild engine, stable references, exporters
apps/web The app: React interface, Three.js viewport, sketch tools
apps/desktop Tauri 2 shell: native files and dialogs, recent files, local version history
apps/server Rust/Axum server: accounts, design storage with versions, SQLite or PostgreSQL
deploy systemd and OpenRC services, settings template, installer, Dockerfiles, Compose file

More in ARCHITECTURE.md.

Releasing (maintainers)

  1. Set the same version in package.json, apps/desktop/src-tauri/tauri.conf.json, apps/desktop/src-tauri/Cargo.toml and apps/server/Cargo.toml (and their lock files: npm install, cargo update -w).
  2. Commit, then tag and push: git tag -a v0.3.0 -m "0.3.0: …" && git push origin v0.3.0.
  3. The Release workflow tests everything, builds the desktop installers, the server for x86_64 and arm64, and the Docker image, then publishes the release with SHA256SUMS. The Installers workflow then tries the one-line installers on Linux, macOS, Windows and Docker.

To rebuild an existing release, run the Release workflow by hand (Actions ▸ Release ▸ Run workflow) with the tag.

Clone this wiki locally