Tauri os
提供与操作系统相关的实用工具方法和属性。
当 build.withGlobalTauri 设置为 in 时,也可以访问此包。window.__TAURI__.ostauri.conf.jsontrue
必须将 API 添加到 tauri.allowlist.os 中:tauri.conf.json
{
"tauri": {
"allowlist": {
"os": {
"all": true, // enable all Os APIs
}
}
}
}建议仅将您使用的 API 列入许可列表,以获得最佳捆绑包大小和安全性。