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