app-anything GitHub

Why an intermediate representation

The project's central artifact is neither the manifest nor any platform's output format: it is the .aapkg package, an explicit intermediate representation — the "ONNX model" analogy of this system. This page records why that choice exists and what it costs.

The problem it solves

Without an intermediate form, "build for N platforms" means N generators that each read the project directory and guess. Every generator re-detects, re-validates and re-encodes, and they drift apart: the web build knows about index.html, the desktop build about a bundle identifier, the mobile build about an app id, and none of them agree on what the app is. Users experience this as "it works on the web but the desktop build serves last week's version."

The shape of the choice

The compiler makes one package: a manifest (identity, frontend, backend, capabilities, window), the built frontend, the backend form (source plus lock by default), assets, and the checks report that gated it. Creators are renderers of that package — they read a documented, versioned, checksummed thing, never the developer's directory.

What it buys

What it costs

One format to keep honest: aapkg.json is versioned and migrated like the manifest, and an intermediate representation nobody adopts is just an extra step. The project pays that cost deliberately — the alternative, N diverging guesses, is how "portable" tools historically die. The package layout itself is documented in the package and portability.

Rendered from docs/explanation/why-the-intermediate-representation.md on main.