Skip to content

Building from Source

Virgile Thonnier edited this page Jul 17, 2026 · 2 revisions

Building from Source

Prerequisites

  • Node.js (LTS) + npm.
  • Rust (stable) with the MSVC toolchain on Windows.
  • protoc (Protocol Buffers compiler) — required by LanceDB (lance-encoding). Install with choco install protoc or winget install protobuf, and make sure protoc is on PATH.
  • Platform build tools: on Windows, the Visual Studio C++ build tools / WebView2 (usually already present on Win10/11).

Clone & run

git clone https://github.com/Eligrive/SenseTree.git
cd SenseTree
npm install

npm run tauri dev      # dev build with hot-reload frontend

The first build is long: it compiles heavy crates (ort, lancedb, arrow) and, on first index, downloads the local embedding model.

Useful scripts

Command Does
npm run dev Vite dev server (frontend only).
npm run build tsc typecheck + Vite production build of the frontend.
npm run tauri dev Full app in development.
npm run tauri build Production build → installers in src-tauri/target/release/bundle/.

After changing Rust code you must restart npm run tauri dev; frontend changes hot-reload.

Project layout

SenseTree/
├─ src/                 # React 19 + TS frontend
│  ├─ components/       # UI panels & modals
│  └─ lib/              # typed IPC, types, helpers
├─ src-tauri/           # Rust core (Tauri v2)
│  ├─ src/              # backend modules (see Architecture)
│  ├─ Cargo.toml        # Rust deps + app version
│  └─ tauri.conf.json   # bundle config + app version + identifier
├─ package.json         # frontend deps + app version
└─ .github/workflows/release.yml   # tag-triggered release build

See the Architecture page for what each module does.

Bundle configuration

src-tauri/tauri.conf.json sets:

  • productName: sensetree, identifier: com.virgi.sensetree (the identifier is the stable key that makes upgrades install in place — don't change it lightly),
  • bundle.targets: "all" → both NSIS (-setup.exe) and MSI installers. To emit only the NSIS installer, set "targets": ["nsis"].

Releasing

Releases are automated by .github/workflows/release.yml, triggered on pushing a tag v*:

  1. Bump the version in three places so they agree: package.json, src-tauri/Cargo.toml (and Cargo.lock), src-tauri/tauri.conf.json.
  2. Commit, then tag and push:
    git commit -am "chore(release): version X.Y.Z"
    git tag -a vX.Y.Z -m "SenseTree vX.Y.Z"
    git push origin main
    git push origin vX.Y.Z
  3. The workflow (on windows-latest) installs Node, Rust, protoc, builds the app, and creates a draft GitHub Release named SenseTree vX.Y.Z with the installers attached.
  4. Review and publish the draft (e.g. gh release edit vX.Y.Z --draft=false --latest).

The workflow resolves the tag/version from tauri.conf.json, so the pushed tag must match v + that version. If you fix the workflow itself, re-create the tag on the commit that contains the fix (a tag build uses the workflow file as of the tag's commit).

Common build issue

Could not find protoc → install protoc (above). This is the one non-obvious native prerequisite. See Troubleshooting.

Clone this wiki locally