Skip to content

Desktop

nodemode-ai edited this page Nov 8, 2026 · 1 revision

Desktop

The desktop app is a Tauri 2 shell (src-tauri/) around the same interface, with the engine frozen into a sidecar binary.

  • ./build_app does the whole build from a fresh clone on macOS or Linux, one command: it checks Python, Node, the Xcode tools and Rust (installing Rust with rustup into ~/.cargo when missing), runs install_all and install_desktop, builds the window, freezes the engine, runs tauri build, retries once after a clean when the Rust compile fails, then on macOS packs a disk image and copies formlit.app to Applications, and on Linux leaves a .deb (--install installs it with apt). --lite, --no-install, --open and --clean change those steps; everything is logged to build_app.log. ./formlit desktop build runs it. On Windows, build_app.bat does the same from a fresh clone: it checks Python, Node 22 and Rust, runs setup\install_all.bat (--lite passes through), setup\install_desktop.bat and setup\desktop_build.bat, stops at the first failing step with a sentence saying so, and --open opens the folder with the .msi and setup .exe. It does not install Rust for you and writes no log file.
  • ./formlit install-desktop installs PyInstaller and checks the Rust and Tauri toolchain.
  • ./formlit freeze builds formlit-engine with PyInstaller from backend/formlit_engine.py (collecting the app, uvicorn, rawpy, numba and llvmlite, ONNX Runtime, reportlab and imagecodecs, and bundling shared/ and the built frontend) into src-tauri/binaries/, which git ignores. Command modules and publish services that the engine imports by name are listed with --hidden-import in setup/freeze_backend and freeze_backend.bat; the new binary must pass --selfcheck (every one of those modules imports) before it is copied.
  • ./formlit desktop dev runs the shell against the dev frontend.

At launch the shell shows a splash, spawns the sidecar with FORMLIT_PORT=8390 (the frozen entry marks itself as the desktop engine and serves the bundled interface), reads the port from the engine's startup line, and loads the interface from it. The port is fixed so the formlit plugin's bridge always finds /mcp; when something already listens on 8390 the sidecar takes a free port instead and the window still follows it. Closing the window stops the engine. .fldb catalogs are associated with the app. In-app updates come from GitHub Releases once the updater key is set (see Releasing).

Clone this wiki locally