Version 1.4· 25 sections· 77 min read

SLAT: a backend pattern for Rust and Tauri apps

The complete guide to SLAT 1.4 (Slice · Layer · Actor · Tier): tiers, slices, actors, platforms, plugins, enforcement, migration and a worked example.

Contents

SLAT is a pattern for laying out the backend of a desktop application written in Rust, with Tauri as the window layer. It answers three questions that every growing codebase eventually gets wrong: where does this file go, who may import whom, and how does data move between the window, the domain and the outside world.

The name lists its four building blocks: Slice, Layer, Actor, Tier. Every rule in this document is about one of them.

This page is the complete reference. It is written so that a team that has never seen SLAT can adopt it in a new project or migrate an existing one, without asking us anything. It includes the rules, the reasons behind them, code you can copy, the checks that enforce them, and a worked example of a messy application brought into shape step by step.

Section numbers are stable. A repository that follows SLAT keeps a short copy of the rules in docs/slat/SLAT.md with the same numbers, so a reference such as "section 17.8" means the same thing on this page and in the repository. When the two differ, both are corrected on the same day. A new section is added just before the version history, which always stays last.

Version 1.4 · 7 November 2026. Version 1.4 adds section 24, Plugin packages, optional and built on section 23: plugins that ship on their own as signed programs running in their own process, with a manifest, a JSON-RPC protocol over stdio, signing and a store, install, update, automatic update and uninstall, permissions, tests and checks. Section 23.11 now points to it. A workspace without packages needs no change. The full history is in section 25.

Contents

  1. 1Why SLAT exists
  2. 2SLAT on one page
  3. 3Vocabulary
  4. 4Where SLAT comes from
  5. 5Tiers
  6. 6Slices
  7. 7Who may import whom
  8. 8Data flows
  9. 9Actors: slices with state
  10. 10The variant explosion
  11. 11AppState, the composition root
  12. 12Platforms
  13. 13Errors
  14. 14Testing by layer
  15. 15Size limits
  16. 16Enforcement
  17. 17Recipes
  18. 18Working with coding agents
  19. 19Migrating an existing codebase
  20. 20Case study: Quayside
  21. 21Adoption checklist and FAQ
  22. 22Build and test time
  23. 23Plugins
  24. 24Plugin packages
  25. 25Version history
Start reading