Phasic← Overview

File layout

Phasic carries data beside its binary:

<application root>/
  models/        the model zoo — one directory per model
  runtime/       the ONNX Runtime shared library
  assets/        fonts, icons, the head mesh

Finding the root

The root is resolved at run time, never baked in at build time — a compile-time path stops existing the moment the project is moved or the binary is packaged. Resolution order:

  1. PHASIC_HOME, if set and it is a directory. An explicit override
  2. The executable’s own directory and its ancestors, which covers both a packaged build sitting beside its runtime/ and a development build under target/
  3. The working directory and its ancestors, which covers running from inside the tree
  4. The build-time manifest directory, as a last resort

A directory counts as the root when it contains Cargo.toml, runtime/ or models/ — markers that identify both a source checkout and an unpacked build.

Model paths and moving the project

Stored paths — recent files, the last model used — are written relative to the root as @root/models/… rather than as absolute paths, so they survive the project being moved or the application being installed elsewhere. A stale absolute path that once pointed into a models/ directory is re-anchored against the current root.

Overriding

Variable Effect
PHASIC_HOME Sets the application root explicitly
ORT_DYLIB_PATH Points at a specific ONNX Runtime library, bypassing the search