System Capabilities & Plugins
8 端统一系统能力与插件矩阵
GPUX 通过纯 Rust Trait 与声明式权限模型(gpux permission add)统一桌面、移动端、Web 浏览器与小程序原生宿主 API。
8 端平台兼容性总表 (Support Matrix)
| 能力模块 / Crate | 核心 API | macOS | Linux | Windows | iOS | Android | HarmonyOS | Web WASM | MiniProgram |
|---|---|---|---|---|---|---|---|---|---|
gpux::clipboard |
读写文本、HTML 与图像剪贴板 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Clipboard API | wx.setClipboardData |
gpux::dialog |
原生文件打开/保存选择器与系统警告框 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | File System API | wx.chooseMessageFile |
gpux::notification |
操作系统级通知横幅与交互动作 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | Web Notification | SubscribeMsg |
gpux::storage |
SQLite (WAL) / IndexedDB / Keychain 安全存储 | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | OPFS / IDB | wx.setStorage |
gpux::http |
Rust TLS HTTP/2 & WebSocket(原生端无 CORS 限制) | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | fetch / WS | wx.request / WS |
gpux::biometric |
TouchID / FaceID / Windows Hello / 指纹生物识别 | ✓ | Polkit | ✓ | ✓ | ✓ | ✓ | WebAuthn | wx.startSoterAuth |
gpux::tray |
状态栏托盘图标、上下文菜单与全局热键 | ✓ | ✓ | ✓ | — | — | — | — | — |
gpux::haptics |
Taptic Engine / 线性马达触觉反馈与传感器陀螺仪 | Trackpad | — | — | ✓ | ✓ | ✓ | Vibration API | wx.vibrateShort |
gpux::updater |
Ed25519 签名校验差分包与热更新器 | ✓ | ✓ | ✓ | AppStore | ✓ | AppGallery | SW Cache | UpdateManager |
Plugin · 01
无 CORS 限制的网络栈 (HTTP / WS)
由于不经过浏览器 WebView 沙箱,所有 HTTP 请求、SSE 流式响应(如 OpenAI / Claude API)与 WebSocket 均在原生 Rust 线程直接发起,零跨域代理烦恼。
Plugin · 02
硬件级安全密钥链与生物识别
统一调用 macOS/iOS Keychain、Windows DPAPI、Linux Secret Service、Android Keystore 与鸿蒙 HUKS,支持 FaceID / 指纹门控读取私钥。
Plugin · 03
自定义插件扩展接口
只需实现 ServiceRegistry::register 即可将任意 Rust Crate 或 Swift / Kotlin / ArkTS 原生 SDK 封装为可复用的 GPUX 插件。