Skip to main content

云桥

易用性
拓展性
性能
安全性
优点
  • 所有特性都可用
  • 不需要 Rust 技能
缺点
  • 打包体积最大
  • 难以分离关注点

说明#

云桥接方法结合了本地主机的灵活性和桥接的安全性。有这么多的功能,很容易让人迷失。

示意图#

graph TD H==>F2 H==>D2 D2-->F2 F2-->D2 B-->D D-->B E2-->D D-->E2 subgraph WEBVIEW F2 E2 end subgraph SERVER D2 E-->D2 end subgraph RUST A==>H A-->B B-.-C end A[Binary] B{Rust Broker} C[Subprocess] D(( API BRIDGE )) E{JS Broker} D2(( localhost )) E[bundled resources] E2{JS Broker} F2[Window] H{Bootstrap} style D fill:#ccc,stroke:#333,stroke-width:4px,color:white style RUST fill:#fad3a9,stroke:#F28918,stroke-width:4px style WEBVIEW fill:#abd0f9,stroke:#1D81EE,stroke-width:4px style SERVER fill:#49A24A,stroke:#2B6063,stroke-width:4px

配置#

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

"tauri": {
  "allowlist": {
    "all": true                   // enable entire API
  }
}