Skip to main content

Hermit

易用性
拓展性
性能
安全性
优点
  • Quick to make
  • Smallest size
缺点
  • No remote resources
  • No access to API

说明#

The Hermit recipe is a pattern for ultimate application isolation where all logic is self-contained in the Window and the binary exists merely to bootstrap the Window. There is no communication back to Rust from the Window, there is no localhost server, and the Window has no access to any remote resources. The Hermit is great for interactive Kiosk Mode and standalone HTML based games.

示意图#

graph LR A==>H H==>F subgraph WEBVIEW F end subgraph RUST A end A[fa:fa-cog Binary ] F[fa:fa-window-maximize Window] H{Bootstrap} style RUST fill:#fad3a9,stroke:#F28918,stroke-width:4px style WEBVIEW fill:#abd0f9,stroke:#1D81EE,stroke-width:4px

配置#

这是你需要在你的 tauri.conf.json 中添加的配置:

"tauri": {
  "allowlist": {
    "all": false,       // disable and tree-shake all api functions
  }
}