Skip to main content

Lockdown

Ease of Use
Extensibility
Performance
Security
Pros:
  • Highest security rating
  • Elegant and powerful
Cons:
  • Rust skills required
  • No remote resources

Description#

The Lockdown recipe is a minimal usage of the Bridge pattern, which only allows interaction between Rust and the Window via expiring JS Promise Closures that are injected into the Window by Rust and nulled as part of the callback.

Diagram#

graph TD H==>F G-.->B B-->G subgraph WEBVIEW G-->F end subgraph RUST A-->B A==>H end A[Binary] B[API:Event] F[Window] G((Promise Closure)) H{Bootstrap} style RUST fill:#fad3a9,stroke:#F28918,stroke-width:4px style WEBVIEW fill:#abd0f9,stroke:#1D81EE,stroke-width:4px

Configuration#

Here's what you need to add to your tauri.conf.json file:

"tauri": {
  "allowlist": {}                  // all API endpoints are default false
}