Hermit
易用性 | |
拓展性 | |
性能 | |
安全性 |
![Hermit](/tauri-docs/img/patterns/Hermit.png)
优点
- 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
}
}