Reference · Configuration Schema
gpux.json 配置 Schema 参考
每个 GPUX 工程根目录均包含一份声明式 gpux.json 清单文件(对应 Rust 中的 gpux_core::AppManifest),用于统一管理应用元数据、窗口几何参数、7 平台构建目标、WASM 字体回退策略与 ACL 权限列表。
顶层字段 (`AppManifest`)
| 属性路径 | 类型 | 必填 | 默认值 | 说明 |
|---|---|---|---|---|
name | string | 是 | — | 工程与二进制产物名称(如 "gpux-studio") |
app_id | string | 是 | "com.gpux.app" | 反向域名格式 Bundle Identifier(用于 macOS/iOS CFBundleIdentifier、Android applicationId 与鸿蒙 bundleName) |
version | string | 是 | "0.1.0" | 遵循 SemVer 2.0 的应用版本号 |
window | WindowConfig | 是 | 见下表 | 主窗口初始尺寸、标题与缩放行为 |
targets | string[] | 是 | 7 端全开 | 启用的构建目标数组:["macos", "linux", "windows", "ios", "android", "harmonyos", "web"] |
窗口配置 (`window: WindowConfig`)
| 字段 | 类型 | 默认值 | 说明 |
|---|---|---|---|
window.title | string | "GPUX Application" | 桌面端窗口标题栏与 Web 页面 document.title |
window.width | f32 | 1024.0 | 初始窗口逻辑像素宽度 |
window.height | f32 | 720.0 | 初始窗口逻辑像素高度 |
window.resizable | bool | true | 是否允许用户拖拽调整桌面窗口尺寸 |
完整生产级 gpux.json 示例
json
{
"name": "gpux-telemetry",
"app_id": "ink.waya.gpux.telemetry",
"version": "0.1.0",
"window": {
"title": "GPUX Telemetry Workbench",
"width": 1280.0,
"height": 800.0,
"resizable": true
},
"targets": [
"macos",
"linux",
"windows",
"ios",
"android",
"harmonyos",
"web"
]
}