3.5 KiB
Kryon App Build Plan
Kryon owns the repeatable build and packaging flow for every Kryon app. App
repositories provide app metadata, native sources, .kry sources, and assets.
Kryon provides the compiler, runtime, dependency builds, packaging helpers,
Krait preview hooks, and diagnostics through the kryon command.
App Contract
Each app should define one project file, project.kryon, with the portable
metadata Kryon needs:
- app id, name, title, version, license, maintainer, website, categories
- source roots for C and
.kry - asset roots for images, sounds, fonts, locales, and generated embedded assets
- platform knobs such as Android id/activity, Linux desktop metadata, package names, and signing-key variables
- build feature flags such as file dialog, tray, sync, audio, and web runtime
The app repo may keep small glue files for platform entry points, but target selection, dependency build rules, generated Kryon C output, and package layout should come from Kryon.
Unified Commands
Kryon exposes one command surface for all apps:
kryon build nativekryon build webkryon build android-debugkryon build android-releasekryon package linux-desktopkryon package linuxkryon package appimagekryon package debkryon package rpmkryon package flatpakkryon package snapkryon package clickkryon package windowskryon previewkryon test
Makefiles in app repos are thin wrappers that call these commands.
Build Ownership
Kryon owns:
- strict
.kryparsing and file:line:column diagnostics - generated C and headers under the app build directory
- runtime source selection for native, web, Windows, Click, and Android
- Raylib, curl, liboqs, and other shared vendor build rules
- embedded asset generation
- Linux desktop files, icons, metainfo, AppImage, deb, rpm, Flatpak, Snap, and Click packaging helpers
- Android CMake, Gradle property generation, APK/AAB assembly hooks, and asset copy helpers
- web/WASM HTML, JS, data-file generation, cache busting, and smoke-test hooks
- Podman-backed Linux packaging where host tools are missing or platform isolation is needed
Apps own:
- product code and app-specific C modules
.krypages, widgets, and screens- translations and media assets
- app metadata values in
project.kryon - optional platform-specific shims that cannot be generalized cleanly
Migration Phases
- Rename old build variables and paths from Flint to Kryon in every app.
vendor/kryonis the only runtime submodule path. - Keep app Makefiles working, but make them use
KRYON_DIRand Kryon-ownedmk/*.mkincludes exclusively. - Move repeated Makefile logic from Inbe into Kryon
mk/app.mk,mk/android.mk,mk/web.mk, andmk/package-linux.mk. - Add a Kryon CLI wrapper that reads
project.kryonand invokes the shared make fragments with normalized variables. - Convert app Makefiles to compatibility shims, then remove duplicated app-side package/build rules.
- Make Krait use the same build graph for preview/run so errors from manual build, auto preview, and package targets use one diagnostic format.
- Add template checks so new Kryon apps start with the unified layout.
Vendor Rule
Vendored Kryon directories are pinned dependencies. App builds must not modify
files under vendor/kryon. Regenerated Kryon runtime assets, generated icon
tables, and shared packaging helpers must be changed in the root Kryon
repository, committed there, and consumed by updating the app submodule pointer.