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
| Field | Description |
|---|---|
id | Reverse-DNS bundle identifier (e.g. com.example.myapp) |
name | Short machine name |
display_name | Human-readable app name (menu bar, window title fallback) |
version | Semver version string |
icons | Paths to icon files for packaging |
platforms | Target platforms: macos, linux, windows |
permissions | Runtime permissions (see Security) |
capabilities | Feature declarations (see Security) |
bridge | Bridge command policies (see Bridge) |
security | Navigation and external link policies (see Security) |
web_engine | system or chromium; Chromium is currently supported for macOS builds (see Web Engines) |
cef | CEF runtime config for Chromium apps: dir and auto_install |
windows | Window definitions (see Windows) |
frontend | Frontend 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,
},
},| Field | Description |
|---|---|
url | Dev server URL to load in the WebView during development |
command | Command to start the dev server (spawned as a child process) |
ready_path | HTTP path to poll until the dev server is ready (default /) |
timeout_ms | Milliseconds to wait for the dev server before failing (default 30000) |
Validation
zero-native validate app.zon
zero-native doctor --manifest app.zon --strict