app.zon Reference

The app.zon manifest declares app metadata, permissions, bridge policies, security rules, and window layout. It is read by the CLI and tooling at build, package, and validation time.

Example

.{
    .id = "dev.zero_native",
    .name = "zero-native",
    .display_name = "zero-native",
    .version = "0.1.0",
    .icons = .{ "assets/icon.icns", "assets/icon.ico" },
    .platforms = .{ "macos" },
    .permissions = .{ "window" },
    .capabilities = .{ "webview", "js_bridge" },
    .bridge = .{
        .commands = .{
            .{ .name = "native.ping", .origins = .{ "zero://app" } },
            .{ .name = "zero-native.window.create", .permissions = .{ "window" }, .origins = .{ "zero://app" } },
        },
    },
    .security = .{
        .navigation = .{
            .allowed_origins = .{ "zero://app", "http://127.0.0.1:5173" },
            .external_links = .{ .action = "deny" },
        },
    },
    .web_engine = "system",
    .cef = .{ .dir = "third_party/cef/macos", .auto_install = false },
    .windows = .{
        .{ .label = "main", .title = "zero-native", .width = 720, .height = 480, .restore_state = true },
    },
}

Fields

FieldDescription
idReverse-DNS bundle identifier (e.g. com.example.myapp)
nameShort machine name
display_nameHuman-readable app name (menu bar, window title fallback)
versionSemver version string
iconsPaths to icon files for packaging
platformsTarget platforms: macos, linux, windows
permissionsRuntime permissions (see Security)
capabilitiesFeature declarations (see Security)
bridgeBridge command policies (see Bridge)
securityNavigation and external link policies (see Security)
web_enginesystem or chromium; Chromium is currently supported for macOS builds (see Web Engines)
cefCEF runtime config for Chromium apps: dir and auto_install
windowsWindow definitions (see Windows)
frontendFrontend build/dev config (see Frontend Projects)

frontend.dev

The optional frontend.dev block configures the managed dev server for zero-native dev and zig build dev:

.frontend = .{
    .dist = "frontend/dist",
    .entry = "index.html",
    .spa_fallback = true,
    .dev = .{
        .url = "http://127.0.0.1:5173/",
        .command = .{ "npm", "--prefix", "frontend", "run", "dev" },
        .ready_path = "/",
        .timeout_ms = 30000,
    },
},
FieldDescription
urlDev server URL to load in the WebView during development
commandCommand to start the dev server (spawned as a child process)
ready_pathHTTP path to poll until the dev server is ready (default /)
timeout_msMilliseconds to wait for the dev server before failing (default 30000)

Validation

zero-native validate app.zon
zero-native doctor --manifest app.zon --strict