Overview
The Allternit Platform Launcher is a single-binary distribution of the Allternit platform. It embeds the Rustallternit-api binary and the static UI assets from surfaces/ai.allternit.com, then self-extracts to the user’s cache directory on first run. This gives users a true double-clickable executable that starts both the API server and the local UI.
The launcher lives in cmd/launcher and is published as allternit-platform-launcher.
Why a standalone launcher?
include_bytes!andinclude_dir!require the embedded artifacts to exist at compile time.- Keeping the launcher crate outside the root workspace lets
cargo check --workspacepass without requiring every developer to build the full UI and API binary first. - Users get one file that starts the complete platform locally.
Embed pipeline
The launcher embeds two artifacts:embed/allternit-api— the compiledallternit-apirelease binary.embed/ui— the built static UI assets.
Build the artifacts
- Builds
allternit-apiin release mode. - Builds the UI with
pnpm install && pnpm build. - Copies both artifacts into
cmd/launcher/embed/.
Build the launcher
target/release/allternit-platform-launcher.
Runtime behavior
On first run, the launcher:- Creates a persistent cache directory (for example,
~/.cache/allternit-platformon macOS). - Extracts the API binary and UI assets to the cache directory.
- Starts the API server on
127.0.0.1:3010. - Starts a minimal static-file UI server on
127.0.0.1:3456. - Opens the user’s browser to the UI.
Default ports
Environment variables
The launcher sets the following environment variables for the API child process:Stopping the launcher
PressCtrl+C in the terminal. The launcher sends SIGTERM to the API child process and exits cleanly. The cache directory is intentionally not deleted so the next startup is faster.