Reference · Configuration Schema

gpux.json 配置 Schema 参考

每个 GPUX 工程根目录均包含一份声明式 gpux.json 清单文件(对应 Rust 中的 gpux_core::AppManifest),用于统一管理应用元数据、窗口几何参数、7 平台构建目标、WASM 字体回退策略与 ACL 权限列表。

顶层字段 (`AppManifest`)

属性路径类型必填默认值说明
namestring是—工程与二进制产物名称(如 "gpux-studio")
app_idstring是"com.gpux.app"反向域名格式 Bundle Identifier(用于 macOS/iOS CFBundleIdentifier、Android applicationId 与鸿蒙 bundleName)
versionstring是"0.1.0"遵循 SemVer 2.0 的应用版本号
windowWindowConfig是见下表主窗口初始尺寸、标题与缩放行为
targetsstring[]是7 端全开启用的构建目标数组:["macos", "linux", "windows", "ios", "android", "harmonyos", "web"]

窗口配置 (`window: WindowConfig`)

字段类型默认值说明
window.titlestring"GPUX Application"桌面端窗口标题栏与 Web 页面 document.title
window.widthf321024.0初始窗口逻辑像素宽度
window.heightf32720.0初始窗口逻辑像素高度
window.resizablebooltrue是否允许用户拖拽调整桌面窗口尺寸

完整生产级 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"
  ]
}