[{"data":1,"prerenderedAt":481},["ShallowReactive",2],{"blog-slat-2-en":3},{"number":4,"title":5,"summary":6,"parts":7,"toc":14,"minutes":480},2,"SLAT on one page","@@diagram:tiers@@",[8,11],{"kind":9,"name":10},"diagram","tiers",{"kind":12,"html":13},"html","\u003Cpre>\u003Ccode>app ──► core ──► store ──► kit\n  │       └────► drivers ─► kit\n  └─ only app knows tauri          only drivers\u002Fsrc\u002Fplatform\u002F knows the operating system\n\ncore\u002F&lt;slice&gt;\u002F   model.rs  logic.rs  store.rs  service.rs  actor\u002F  mod.rs\napp\u002F&lt;slice&gt;\u002F    commands.rs  dto.rs  events.rs  mod.rs\n\nQuery:    UI ─invoke─► commands ─► service ─► store ─► DTO ─► UI\nCommand:  UI ─invoke─► commands ─► service | Handle ─► (actor: Msg ─► update ─► Effect) ─► store\u002Fdrivers\nEvent:    actor\u002Fservice ─► Snapshot | Event ─► app\u002Fevents ─emit─► front-end store\n\u003C\u002Fcode>\u003C\u002Fpre>\n\u003Cp>Six sentences to remember:\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Only the \u003Ccode>app\u003C\u002Fcode> crate knows Tauri.\u003C\u002Fstrong> Everything else compiles and is tested without a window.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A feature lives in one slice, and a slice has fixed files.\u003C\u002Fstrong> Looking for chat? It is in \u003Ccode>core\u002Fchat\u002F\u003C\u002Fcode> and \u003Ccode>app\u002Fchat\u002F\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>A Tauri command has at most 10 lines\u003C\u002Fstrong>: deserialize, call one function of the slice, map the result to a DTO.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Long-lived state has one owner: an actor.\u003C\u002Fstrong> No \u003Ccode>Mutex&lt;Option&lt;…&gt;&gt;\u003C\u002Fcode> or \u003Ccode>AtomicBool\u003C\u002Fcode> in the application state, no \u003Ccode>static\u003C\u002Fcode> with state inside slices.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Dependencies point down.\u003C\u002Fstrong> A lower tier never imports a higher one, and the compiler enforces it.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Only \u003Ccode>drivers\u002Fsrc\u002Fplatform\u002F\u003C\u002Fcode> knows the operating system.\u003C\u002Fstrong> The rest asks for concepts (process group, secret, data folder), never for system calls.\u003C\u002Fli>\n\u003C\u002Fol>\n",[15,32,36,40,44,64,88,104,124,148,152,160,192,196,220,224,248,284,288,308,328,344,380,428,476],{"id":16,"text":17,"depth":4,"children":18},"s1","1. Why SLAT exists",[19,24,28],{"id":20,"text":21,"depth":22,"children":23},"s1-1","1.1. Goals",3,[],{"id":25,"text":26,"depth":22,"children":27},"s1-2","1.2. Non-goals",[],{"id":29,"text":30,"depth":22,"children":31},"s1-3","1.3. Who should use it",[],{"id":33,"text":34,"depth":4,"children":35},"s2","2. SLAT on one page",[],{"id":37,"text":38,"depth":4,"children":39},"s3","3. Vocabulary",[],{"id":41,"text":42,"depth":4,"children":43},"s4","4. Where SLAT comes from",[],{"id":45,"text":46,"depth":4,"children":47},"s5","5. Tiers",[48,52,56,60],{"id":49,"text":50,"depth":22,"children":51},"s5-1","5.1. The compiler is the guard",[],{"id":53,"text":54,"depth":22,"children":55},"s5-2","5.2. How many crates to start with",[],{"id":57,"text":58,"depth":22,"children":59},"s5-3","5.3. When to split a tier",[],{"id":61,"text":62,"depth":22,"children":63},"s5-4","5.4. Compatibility exception",[],{"id":65,"text":66,"depth":4,"children":67},"s6","6. Slices",[68,72,76,80,84],{"id":69,"text":70,"depth":22,"children":71},"s6-1","6.1. A slice in core",[],{"id":73,"text":74,"depth":22,"children":75},"s6-2","6.2. A slice in app",[],{"id":77,"text":78,"depth":22,"children":79},"s6-3","6.3. A command, the reference shape",[],{"id":81,"text":82,"depth":22,"children":83},"s6-4","6.4. Registering commands",[],{"id":85,"text":86,"depth":22,"children":87},"s6-5","6.5. Naming slices",[],{"id":89,"text":90,"depth":4,"children":91},"s7","7. Who may import whom",[92,96,100],{"id":93,"text":94,"depth":22,"children":95},"s7-1","7.1. Inside a slice",[],{"id":97,"text":98,"depth":22,"children":99},"s7-2","7.2. Between slices",[],{"id":101,"text":102,"depth":22,"children":103},"s7-3","7.3. Why these particular lines",[],{"id":105,"text":106,"depth":4,"children":107},"s8","8. Data flows",[108,112,116,120],{"id":109,"text":110,"depth":22,"children":111},"s8-1","8.1. Query (a read)",[],{"id":113,"text":114,"depth":22,"children":115},"s8-2","8.2. Command (a change)",[],{"id":117,"text":118,"depth":22,"children":119},"s8-3","8.3. Event (backend → window)",[],{"id":121,"text":122,"depth":22,"children":123},"s8-4","8.4. High-volume streams",[],{"id":125,"text":126,"depth":4,"children":127},"s9","9. Actors: slices with state",[128,132,136,140,144],{"id":129,"text":130,"depth":22,"children":131},"s9-1","9.1. When to use an actor",[],{"id":133,"text":134,"depth":22,"children":135},"s9-2","9.2. Files",[],{"id":137,"text":138,"depth":22,"children":139},"s9-3","9.3. The contract",[],{"id":141,"text":142,"depth":22,"children":143},"s9-4","9.4. A complete small actor",[],{"id":145,"text":146,"depth":22,"children":147},"s9-5","9.5. Testing an actor",[],{"id":149,"text":150,"depth":4,"children":151},"s10","10. The variant explosion",[],{"id":153,"text":154,"depth":4,"children":155},"s11","11. AppState, the composition root",[156],{"id":157,"text":158,"depth":22,"children":159},"s11-1","11.1. kit::Jobs: one-shot background work",[],{"id":161,"text":162,"depth":4,"children":163},"s12","12. Platforms",[164,168,172,176,180,184,188],{"id":165,"text":166,"depth":22,"children":167},"s12-1","12.1. Layout",[],{"id":169,"text":170,"depth":22,"children":171},"s12-2","12.2. Contracts",[],{"id":173,"text":174,"depth":22,"children":175},"s12-3","12.3. What is forbidden outside platform\u002F",[],{"id":177,"text":178,"depth":22,"children":179},"s12-4","12.4. Paths, files and text",[],{"id":181,"text":182,"depth":22,"children":183},"s12-5","12.5. Platform tests",[],{"id":185,"text":186,"depth":22,"children":187},"s12-6","12.6. Enforcement",[],{"id":189,"text":190,"depth":22,"children":191},"s12-7","12.7. Porting to a new operating system",[],{"id":193,"text":194,"depth":4,"children":195},"s13","13. Errors",[],{"id":197,"text":198,"depth":4,"children":199},"s14","14. Testing by layer",[200,204,208,212,216],{"id":201,"text":202,"depth":22,"children":203},"s14-1","14.1. One integration binary",[],{"id":205,"text":206,"depth":22,"children":207},"s14-2","14.2. A fake driver without a trait",[],{"id":209,"text":210,"depth":22,"children":211},"s14-3","14.3. Mutants in the diff",[],{"id":213,"text":214,"depth":22,"children":215},"s14-4","14.4. Property tests for update",[],{"id":217,"text":218,"depth":22,"children":219},"s14-5","14.5. A test through the entry",[],{"id":221,"text":222,"depth":4,"children":223},"s15","15. Size limits",[],{"id":225,"text":226,"depth":4,"children":227},"s16","16. Enforcement",[228,232,236,240,244],{"id":229,"text":230,"depth":22,"children":231},"s16-1","16.1. A check with a baseline",[],{"id":233,"text":234,"depth":22,"children":235},"s16-2","16.2. A check must be able to fail",[],{"id":237,"text":238,"depth":22,"children":239},"s16-3","16.3. The platform job in CI",[],{"id":241,"text":242,"depth":22,"children":243},"s16-4","16.4. Checks for the whole set",[],{"id":245,"text":246,"depth":22,"children":247},"s16-5","16.5. Lints and bans before scripts",[],{"id":249,"text":250,"depth":4,"children":251},"s17","17. Recipes",[252,256,260,264,268,272,276,280],{"id":253,"text":254,"depth":22,"children":255},"s17-1","17.1. A new read (Query)",[],{"id":257,"text":258,"depth":22,"children":259},"s17-2","17.2. A new change without background state (Command)",[],{"id":261,"text":262,"depth":22,"children":263},"s17-3","17.3. A new slice",[],{"id":265,"text":266,"depth":22,"children":267},"s17-4","17.4. A new flow with state (actor)",[],{"id":269,"text":270,"depth":22,"children":271},"s17-5","17.5. A new driver (the outside world)",[],{"id":273,"text":274,"depth":22,"children":275},"s17-6","17.6. A new event for the window",[],{"id":277,"text":278,"depth":22,"children":279},"s17-7","17.7. A new platform",[],{"id":281,"text":282,"depth":22,"children":283},"s17-8","17.8. Where does this go? (decision tree)",[],{"id":285,"text":286,"depth":4,"children":287},"s18","18. Working with coding agents",[],{"id":289,"text":290,"depth":4,"children":291},"s19","19. Migrating an existing codebase",[292,296,300,304],{"id":293,"text":294,"depth":22,"children":295},"s19-1","19.1. The order",[],{"id":297,"text":298,"depth":22,"children":299},"s19-2","19.2. Rules of migration",[],{"id":301,"text":302,"depth":22,"children":303},"s19-3","19.3. Layout first, a faster start",[],{"id":305,"text":306,"depth":22,"children":307},"s19-4","19.4. What usually goes wrong",[],{"id":309,"text":310,"depth":4,"children":311},"s20","20. Case study: Quayside",[312,316,320,324],{"id":313,"text":314,"depth":22,"children":315},"s20-1","20.1. Before",[],{"id":317,"text":318,"depth":22,"children":319},"s20-2","20.2. Symptoms in the code",[],{"id":321,"text":322,"depth":22,"children":323},"s20-3","20.3. The migration, step by step",[],{"id":325,"text":326,"depth":22,"children":327},"s20-4","20.4. After",[],{"id":329,"text":330,"depth":4,"children":331},"s21","21. Adoption checklist and FAQ",[332,336,340],{"id":333,"text":334,"depth":22,"children":335},"s21-1","21.1. Checklist for a new project",[],{"id":337,"text":338,"depth":22,"children":339},"s21-2","21.2. Checklist for an existing project",[],{"id":341,"text":342,"depth":22,"children":343},"s21-3","21.3. Questions",[],{"id":345,"text":346,"depth":4,"children":347},"s22","22. Build and test time",[348,352,356,360,364,368,372,376],{"id":349,"text":350,"depth":22,"children":351},"s22-1","22.1. Where the time goes",[],{"id":353,"text":354,"depth":22,"children":355},"s22-2","22.2. Build settings",[],{"id":357,"text":358,"depth":22,"children":359},"s22-3","22.3. One set of features",[],{"id":361,"text":362,"depth":22,"children":363},"s22-4","22.4. Run what a change can affect",[],{"id":365,"text":366,"depth":22,"children":367},"s22-5","22.5. Many working copies",[],{"id":369,"text":370,"depth":22,"children":371},"s22-6","22.6. CI",[],{"id":373,"text":374,"depth":22,"children":375},"s22-7","22.7. What makes a build start over",[],{"id":377,"text":378,"depth":22,"children":379},"s22-8","22.8. Clean target\u002F",[],{"id":381,"text":382,"depth":4,"children":383},"s23","23. Plugins",[384,388,392,396,400,404,408,412,416,420,424],{"id":385,"text":386,"depth":22,"children":387},"s23-1","23.1. When a feature is a plugin",[],{"id":389,"text":390,"depth":22,"children":391},"s23-2","23.2. Layout",[],{"id":393,"text":394,"depth":22,"children":395},"s23-3","23.3. Direction",[],{"id":397,"text":398,"depth":22,"children":399},"s23-4","23.4. Extension points",[],{"id":401,"text":402,"depth":22,"children":403},"s23-5","23.5. On and off",[],{"id":405,"text":406,"depth":22,"children":407},"s23-6","23.6. Front-end",[],{"id":409,"text":410,"depth":22,"children":411},"s23-7","23.7. A plugin in its own crate",[],{"id":413,"text":414,"depth":22,"children":415},"s23-8","23.8. Testing",[],{"id":417,"text":418,"depth":22,"children":419},"s23-9","23.9. Turning an existing slice into a plugin",[],{"id":421,"text":422,"depth":22,"children":423},"s23-10","23.10. Enforcement",[],{"id":425,"text":426,"depth":22,"children":427},"s23-11","23.11. Plugins from outside",[],{"id":429,"text":430,"depth":4,"children":431},"s24","24. Plugin packages",[432,436,440,444,448,452,456,460,464,468,472],{"id":433,"text":434,"depth":22,"children":435},"s24-1","24.1. Built-in plugin or package",[],{"id":437,"text":438,"depth":22,"children":439},"s24-2","24.2. The process rule",[],{"id":441,"text":442,"depth":22,"children":443},"s24-3","24.3. Layout",[],{"id":445,"text":446,"depth":22,"children":447},"s24-4","24.4. The manifest",[],{"id":449,"text":450,"depth":22,"children":451},"s24-5","24.5. The protocol",[],{"id":453,"text":454,"depth":22,"children":455},"s24-6","24.6. Extension points for packages",[],{"id":457,"text":458,"depth":22,"children":459},"s24-7","24.7. Signing and the store",[],{"id":461,"text":462,"depth":22,"children":463},"s24-8","24.8. Life cycle",[],{"id":465,"text":466,"depth":22,"children":467},"s24-9","24.9. Permissions",[],{"id":469,"text":470,"depth":22,"children":471},"s24-10","24.10. Testing",[],{"id":473,"text":474,"depth":22,"children":475},"s24-11","24.11. Enforcement",[],{"id":477,"text":478,"depth":4,"children":479},"s25","25. Version history",[],77,1795449738010]