[{"data":1,"prerenderedAt":484},["ShallowReactive",2],{"blog-slat-6-it":3},{"number":4,"title":5,"summary":6,"parts":7,"toc":16,"minutes":483},6,"Slice","Una slice è una funzionalità del prodotto. Il suo nome è un sostantivo singolare in snake_case: recording, transcript, board, trigger. Non…",[8,11,14],{"kind":9,"html":10},"html","\u003Cp>Una slice è una funzionalità del prodotto. Il suo nome è un sostantivo singolare in \u003Ccode>snake_case\u003C\u002Fcode>: \u003Ccode>recording\u003C\u002Fcode>, \u003Ccode>transcript\u003C\u002Fcode>, \u003Ccode>board\u003C\u002Fcode>, \u003Ccode>trigger\u003C\u002Fcode>. Non \u003Ccode>recordings_manager\u003C\u002Fcode>, non \u003Ccode>utils\u003C\u002Fcode>. Dove il prodotto ha un front-end, i nomi delle slice coincidono con le cartelle delle funzionalità del front-end, così la stessa parola trova il codice su entrambi i lati.\u003C\u002Fp>\n\u003Cp>Una slice esiste in due tier: il suo dominio in \u003Ccode>core\u003C\u002Fcode> e il suo punto di ingresso (comandi, DTO, eventi) in \u003Ccode>app\u003C\u002Fcode>.\u003C\u002Fp>\n",{"kind":12,"name":13},"diagram","slice",{"kind":9,"html":15},"\u003Ch3 id=\"s6-1\">6.1. Una slice in \u003Ccode>core\u003C\u002Fcode>\u003C\u002Fh3>\n\u003Cpre class=\"code-tree\">\u003Ccode>\u003Cspan class=\"t-dir\">core\u002Fsrc\u002F&lt;slice&gt;\u002F\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">mod.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">        public API of the slice: only `mod …;` and `pub use …;`\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">model.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">      domain types, state enums, identifiers; no I\u002FO, no async\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">logic.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">      pure functions: validation, decisions, mappings, calculations\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">store.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">      this slice's reads from SQL and files, and its write commands through the writer\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">service.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">    use cases: async, composes logic + store + drivers; no state of its own\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">error.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">      optional: the slice's error enum\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-dir\">actor\u002F\u003C\u002Fspan>\u003Cspan class=\"t-note\">        only for a slice with background state, section 9\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">tests.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">      optional: unit tests of the slice\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Cp>Regole:\u003C\u002Fp>\n\u003Cul>\n\u003Cli>\u003Cstrong>Un file di cui la slice non ha bisogno non esiste.\u003C\u002Fstrong> Una slice piccola può essere un unico \u003Ccode>mod.rs\u003C\u002Fcode> con modello e servizio, finché non supera circa 400 righe.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Un file che cresce diventa una cartella con lo stesso nome\u003C\u002Fstrong>: \u003Ccode>logic.rs\u003C\u002Fcode> diventa \u003Ccode>logic\u002Fmod.rs\u003C\u002Fcode> più \u003Ccode>logic\u002F&lt;topic&gt;.rs\u003C\u002Fcode>. Il ruolo non cambia, cambia solo il numero di file.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Una slice troppo grande si divide in sotto-slice\u003C\u002Fstrong>: \u003Ccode>run\u002F\u003C\u002Fcode> diventa \u003Ccode>run\u002Fstart\u002F\u003C\u002Fcode>, \u003Ccode>run\u002Fstep\u002F\u003C\u002Fcode>, \u003Ccode>run\u002Ffinish\u002F\u003C\u002Fcode>, ciascuna con la stessa struttura di file. La slice madre conserva solo un \u003Ccode>mod.rs\u003C\u002Fcode> con i re-export.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>\u003Ccode>mod.rs\u003C\u002Fcode> è la porta d'ingresso della slice\u003C\u002Fstrong>, come l'\u003Ccode>index.ts\u003C\u002Fcode> di una libreria Nx. Le altre slice importano solo attraverso di esso.\u003C\u002Fli>\n\u003C\u002Ful>\n\u003Cp>Un tipico \u003Ccode>mod.rs\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre class=\"shiki shiki-themes github-light github-dark\" style=\"--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">mod\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> logic\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">mod\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> model\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">mod\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> service\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">mod\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> store\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">pub\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> use\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> model\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">{\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">Transcript\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">TranscriptId\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">Word\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">};\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">pub\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> use\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> service\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">TranscriptService\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Ch3 id=\"s6-2\">6.2. Una slice in \u003Ccode>app\u003C\u002Fcode>\u003C\u002Fh3>\n\u003Cpre class=\"code-tree\">\u003Ccode>\u003Cspan class=\"t-dir\">app\u002Fsrc\u002F&lt;slice&gt;\u002F\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">mod.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">        `mod …;` and `pub mod commands;` (the command list itself is in lib.rs, 6.4)\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">commands.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">   #[tauri::command] functions; at most 10 lines each\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">dto.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">        wire types: serde camelCase, #[serde(other)] on enums, From&lt;model&gt;, From&lt;error&gt; for IpcError\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">events.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">     event names and payloads sent to the window; snapshot subscription loops\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Cp>Il resto del crate \u003Ccode>app\u003C\u002Fcode>:\u003C\u002Fp>\n\u003Cpre class=\"code-tree\">\u003Ccode>\u003Cspan class=\"t-dir\">app\u002Fsrc\u002F\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">main.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">       calls lib::run(); nothing else\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">lib.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">        run(): Builder, plugins, setup, generate_handler! with every command, grouped by slice\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">state.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">      AppState: the composition root, section 11\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">error.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">      entry error → code and text for the window\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-file\">platform.rs\u003C\u002Fspan>\u003Cspan class=\"t-note\">   optional: window and menu settings that depend on the operating system, section 12.3\u003C\u002Fspan>\n\u003Cspan class=\"t-guide\">  \u003C\u002Fspan>\u003Cspan class=\"t-dir\">doors\u002F\u003C\u002Fspan>\u003Cspan class=\"t-note\">        entries other than the window: MCP server, bridge for agents, remote hub\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Ch3 id=\"s6-3\">6.3. Un comando, la forma di riferimento\u003C\u002Fh3>\n\u003Cpre class=\"shiki shiki-themes github-light github-dark\" style=\"--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">#[tauri\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">command]\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">pub\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> async\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> fn\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> transcript_search\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">    state\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">:\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> State\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">&#x3C;'\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">_\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">AppState\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">>,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">    input\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">:\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> SearchInput\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">) \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">->\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> Result\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">&#x3C;\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">Vec\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">&#x3C;\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">TranscriptHitDto\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">>, \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">IpcError\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">> {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">    let\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> hits \u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">=\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\"> state\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">transcripts\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">search\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(input\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">into\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">())\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">.await?\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">;\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">    Ok\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(hits\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">into_iter\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">()\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">map\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">Into\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">into)\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">.\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">collect\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">())\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Cp>Se un comando ha bisogno di un \u003Ccode>if\u003C\u002Fcode>, di un ciclo o di due chiamate alla slice, quella logica appartiene a \u003Ccode>service.rs\u003C\u002Fcode> o a \u003Ccode>logic.rs\u003C\u002Fcode>. Il limite di 10 righe non è una questione di stile. Un comando che si limita a tradurre non ha bisogno di un test unitario proprio, perché la sua logica è già testata nella slice. Resta da dimostrare la frase che una persona vede, e quella si testa end-to-end attraverso il punto di ingresso (sezione 14).\u003C\u002Fp>\n\u003Ch3 id=\"s6-4\">6.4. Registrare i comandi\u003C\u002Fh3>\n\u003Cp>\u003Ccode>tauri::generate_handler!\u003C\u002Fcode> ha bisogno del percorso completo di ogni comando, quindi \u003Ccode>lib.rs\u003C\u002Fcode> tiene un'unica lista. Va mantenuta raggruppata per slice, un blocco per slice, così aggiungere un comando significa aggiungere una riga accanto ai suoi vicini:\u003C\u002Fp>\n\u003Cpre class=\"shiki shiki-themes github-light github-dark\" style=\"--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e\" tabindex=\"0\">\u003Ccode>\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">pub\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\"> fn\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\"> run\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">() {\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">    tauri\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">Builder\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">default\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">()\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">        .\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">setup\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(setup)\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">        .\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">invoke_handler\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">tauri\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">generate_handler!\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">[\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">            recording\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">commands\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">recording_start,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">            recording\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">commands\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">recording_stop,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">            recording\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">commands\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">recording_list,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">            transcript\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">commands\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">transcript_read,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">            transcript\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">commands\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">transcript_search,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">            board\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">commands\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">board_list,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">            board\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">commands\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">board_sync,\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">        ])\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">        .\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">run\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">tauri\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">::\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">generate_context!\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">())\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#D73A49;--shiki-dark:#F97583\">        .\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#6F42C1;--shiki-dark:#B392F0\">expect\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">(\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#032F62;--shiki-dark:#9ECBFF\">\"the window could not start\"\u003C\u002Fspan>\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">);\u003C\u002Fspan>\u003C\u002Fspan>\n\u003Cspan class=\"line\">\u003Cspan style=\"--shiki-light:#24292E;--shiki-dark:#E1E4E8\">}\u003C\u002Fspan>\u003C\u002Fspan>\u003C\u002Fcode>\u003C\u002Fpre>\n\n\u003Cp>Un comando che esiste in una slice ma manca da questa lista compila e, in silenzio, non fa nulla. La sezione 16 include un piccolo check che confronta le due cose e fallisce quando divergono.\u003C\u002Fp>\n\u003Ch3 id=\"s6-5\">6.5. Dare un nome alle slice\u003C\u002Fh3>\n\u003Cul>\n\u003Cli>Un sostantivo per funzionalità, al singolare: \u003Ccode>trigger\u003C\u002Fcode>, non \u003Ccode>triggers\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Il nome della cosa che chi usa il prodotto riconosce, non della tecnica: \u003Ccode>transcript\u003C\u002Fcode>, non \u003Ccode>whisper_pipeline\u003C\u002Fcode>.\u003C\u002Fli>\n\u003Cli>Quando due funzionalità cambiano sempre insieme, sono una sola slice. Quando una funzionalità ha parti che cambiano in modo indipendente, sono sotto-slice.\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Anche una policy trasversale è una slice\u003C\u002Fstrong>: controlli di accesso, limiti, budget e protezione dei segreti vivono in \u003Ccode>core\u002F&lt;policy&gt;\u002F\u003C\u002Fcode> (per esempio \u003Ccode>core\u002Fguard\u002F\u003C\u002Fcode>), e tutte le altre slice li chiamano.\u003C\u002Fli>\n\u003C\u002Ful>\n",[17,35,39,43,47,67,91,107,127,151,155,163,195,199,223,227,251,287,291,311,331,347,383,431,479],{"id":18,"text":19,"depth":20,"children":21},"s1","1. Perché esiste SLAT",2,[22,27,31],{"id":23,"text":24,"depth":25,"children":26},"s1-1","1.1. Obiettivi",3,[],{"id":28,"text":29,"depth":25,"children":30},"s1-2","1.2. Non-obiettivi",[],{"id":32,"text":33,"depth":25,"children":34},"s1-3","1.3. A chi è rivolto",[],{"id":36,"text":37,"depth":20,"children":38},"s2","2. SLAT in una pagina",[],{"id":40,"text":41,"depth":20,"children":42},"s3","3. Vocabolario",[],{"id":44,"text":45,"depth":20,"children":46},"s4","4. Da dove viene SLAT",[],{"id":48,"text":49,"depth":20,"children":50},"s5","5. Tier",[51,55,59,63],{"id":52,"text":53,"depth":25,"children":54},"s5-1","5.1. Il compilatore fa da guardia",[],{"id":56,"text":57,"depth":25,"children":58},"s5-2","5.2. Con quanti crate iniziare",[],{"id":60,"text":61,"depth":25,"children":62},"s5-3","5.3. Quando dividere un tier",[],{"id":64,"text":65,"depth":25,"children":66},"s5-4","5.4. Eccezione di compatibilità",[],{"id":68,"text":69,"depth":20,"children":70},"s6","6. Slice",[71,75,79,83,87],{"id":72,"text":73,"depth":25,"children":74},"s6-1","6.1. Una slice in core",[],{"id":76,"text":77,"depth":25,"children":78},"s6-2","6.2. Una slice in app",[],{"id":80,"text":81,"depth":25,"children":82},"s6-3","6.3. Un comando, la forma di riferimento",[],{"id":84,"text":85,"depth":25,"children":86},"s6-4","6.4. Registrare i comandi",[],{"id":88,"text":89,"depth":25,"children":90},"s6-5","6.5. Dare un nome alle slice",[],{"id":92,"text":93,"depth":20,"children":94},"s7","7. Chi può importare chi",[95,99,103],{"id":96,"text":97,"depth":25,"children":98},"s7-1","7.1. Dentro una slice",[],{"id":100,"text":101,"depth":25,"children":102},"s7-2","7.2. Tra slice",[],{"id":104,"text":105,"depth":25,"children":106},"s7-3","7.3. Perché proprio questi confini",[],{"id":108,"text":109,"depth":20,"children":110},"s8","8. Flussi di dati",[111,115,119,123],{"id":112,"text":113,"depth":25,"children":114},"s8-1","8.1. Query (una lettura)",[],{"id":116,"text":117,"depth":25,"children":118},"s8-2","8.2. Command (una modifica)",[],{"id":120,"text":121,"depth":25,"children":122},"s8-3","8.3. Evento (backend → finestra)",[],{"id":124,"text":125,"depth":25,"children":126},"s8-4","8.4. Flussi ad alto volume",[],{"id":128,"text":129,"depth":20,"children":130},"s9","9. Attori: slice con stato",[131,135,139,143,147],{"id":132,"text":133,"depth":25,"children":134},"s9-1","9.1. Quando usare un attore",[],{"id":136,"text":137,"depth":25,"children":138},"s9-2","9.2. File",[],{"id":140,"text":141,"depth":25,"children":142},"s9-3","9.3. Il contratto",[],{"id":144,"text":145,"depth":25,"children":146},"s9-4","9.4. Un piccolo attore completo",[],{"id":148,"text":149,"depth":25,"children":150},"s9-5","9.5. Testare un attore",[],{"id":152,"text":153,"depth":20,"children":154},"s10","10. L'esplosione delle varianti",[],{"id":156,"text":157,"depth":20,"children":158},"s11","11. AppState, la composition root",[159],{"id":160,"text":161,"depth":25,"children":162},"s11-1","11.1. kit::Jobs: lavoro in background una tantum",[],{"id":164,"text":165,"depth":20,"children":166},"s12","12. Piattaforme",[167,171,175,179,183,187,191],{"id":168,"text":169,"depth":25,"children":170},"s12-1","12.1. Struttura",[],{"id":172,"text":173,"depth":25,"children":174},"s12-2","12.2. Contratti",[],{"id":176,"text":177,"depth":25,"children":178},"s12-3","12.3. Cosa è vietato fuori da platform\u002F",[],{"id":180,"text":181,"depth":25,"children":182},"s12-4","12.4. Percorsi, file e testo",[],{"id":184,"text":185,"depth":25,"children":186},"s12-5","12.5. Test di piattaforma",[],{"id":188,"text":189,"depth":25,"children":190},"s12-6","12.6. Applicazione delle regole",[],{"id":192,"text":193,"depth":25,"children":194},"s12-7","12.7. Port su un nuovo sistema operativo",[],{"id":196,"text":197,"depth":20,"children":198},"s13","13. Errori",[],{"id":200,"text":201,"depth":20,"children":202},"s14","14. Test per layer",[203,207,211,215,219],{"id":204,"text":205,"depth":25,"children":206},"s14-1","14.1. Un solo binario di integrazione",[],{"id":208,"text":209,"depth":25,"children":210},"s14-2","14.2. Un driver finto senza trait",[],{"id":212,"text":213,"depth":25,"children":214},"s14-3","14.3. Mutanti nel diff",[],{"id":216,"text":217,"depth":25,"children":218},"s14-4","14.4. Test di proprietà per update",[],{"id":220,"text":221,"depth":25,"children":222},"s14-5","14.5. Un test attraverso il punto di ingresso",[],{"id":224,"text":225,"depth":20,"children":226},"s15","15. Limiti di dimensione",[],{"id":228,"text":229,"depth":20,"children":230},"s16","16. Applicazione delle regole",[231,235,239,243,247],{"id":232,"text":233,"depth":25,"children":234},"s16-1","16.1. Un check con una baseline",[],{"id":236,"text":237,"depth":25,"children":238},"s16-2","16.2. Un check deve poter fallire",[],{"id":240,"text":241,"depth":25,"children":242},"s16-3","16.3. Il job di piattaforma in CI",[],{"id":244,"text":245,"depth":25,"children":246},"s16-4","16.4. I check del set completo",[],{"id":248,"text":249,"depth":25,"children":250},"s16-5","16.5. Lint e divieti prima degli script",[],{"id":252,"text":253,"depth":20,"children":254},"s17","17. Ricette",[255,259,263,267,271,275,279,283],{"id":256,"text":257,"depth":25,"children":258},"s17-1","17.1. Una nuova lettura (Query)",[],{"id":260,"text":261,"depth":25,"children":262},"s17-2","17.2. Una nuova modifica senza stato in background (Command)",[],{"id":264,"text":265,"depth":25,"children":266},"s17-3","17.3. Una nuova slice",[],{"id":268,"text":269,"depth":25,"children":270},"s17-4","17.4. Un nuovo flusso con stato (attore)",[],{"id":272,"text":273,"depth":25,"children":274},"s17-5","17.5. Un nuovo driver (il mondo esterno)",[],{"id":276,"text":277,"depth":25,"children":278},"s17-6","17.6. Un nuovo evento per la finestra",[],{"id":280,"text":281,"depth":25,"children":282},"s17-7","17.7. Una nuova piattaforma",[],{"id":284,"text":285,"depth":25,"children":286},"s17-8","17.8. Dove va questo? (albero decisionale)",[],{"id":288,"text":289,"depth":20,"children":290},"s18","18. Lavorare con gli agenti di coding",[],{"id":292,"text":293,"depth":20,"children":294},"s19","19. Migrare una codebase esistente",[295,299,303,307],{"id":296,"text":297,"depth":25,"children":298},"s19-1","19.1. L'ordine",[],{"id":300,"text":301,"depth":25,"children":302},"s19-2","19.2. Regole della migrazione",[],{"id":304,"text":305,"depth":25,"children":306},"s19-3","19.3. Prima la struttura, per partire più in fretta",[],{"id":308,"text":309,"depth":25,"children":310},"s19-4","19.4. Cosa va storto di solito",[],{"id":312,"text":313,"depth":20,"children":314},"s20","20. Caso di studio: Quayside",[315,319,323,327],{"id":316,"text":317,"depth":25,"children":318},"s20-1","20.1. Prima",[],{"id":320,"text":321,"depth":25,"children":322},"s20-2","20.2. Sintomi nel codice",[],{"id":324,"text":325,"depth":25,"children":326},"s20-3","20.3. La migrazione, passo dopo passo",[],{"id":328,"text":329,"depth":25,"children":330},"s20-4","20.4. Dopo",[],{"id":332,"text":333,"depth":20,"children":334},"s21","21. Checklist di adozione e FAQ",[335,339,343],{"id":336,"text":337,"depth":25,"children":338},"s21-1","21.1. Checklist per un nuovo progetto",[],{"id":340,"text":341,"depth":25,"children":342},"s21-2","21.2. Checklist per un progetto esistente",[],{"id":344,"text":345,"depth":25,"children":346},"s21-3","21.3. Domande",[],{"id":348,"text":349,"depth":20,"children":350},"s22","22. Tempi di build e di test",[351,355,359,363,367,371,375,379],{"id":352,"text":353,"depth":25,"children":354},"s22-1","22.1. Dove va il tempo",[],{"id":356,"text":357,"depth":25,"children":358},"s22-2","22.2. Impostazioni di build",[],{"id":360,"text":361,"depth":25,"children":362},"s22-3","22.3. Un solo insieme di feature",[],{"id":364,"text":365,"depth":25,"children":366},"s22-4","22.4. Eseguire ciò che una modifica può toccare",[],{"id":368,"text":369,"depth":25,"children":370},"s22-5","22.5. Molte copie di lavoro",[],{"id":372,"text":373,"depth":25,"children":374},"s22-6","22.6. CI",[],{"id":376,"text":377,"depth":25,"children":378},"s22-7","22.7. Cosa fa ripartire una build da capo",[],{"id":380,"text":381,"depth":25,"children":382},"s22-8","22.8. Ripulire target\u002F",[],{"id":384,"text":385,"depth":20,"children":386},"s23","23. Plugin",[387,391,395,399,403,407,411,415,419,423,427],{"id":388,"text":389,"depth":25,"children":390},"s23-1","23.1. Quando una funzionalità è un plugin",[],{"id":392,"text":393,"depth":25,"children":394},"s23-2","23.2. Struttura",[],{"id":396,"text":397,"depth":25,"children":398},"s23-3","23.3. Direzione",[],{"id":400,"text":401,"depth":25,"children":402},"s23-4","23.4. Punti di estensione",[],{"id":404,"text":405,"depth":25,"children":406},"s23-5","23.5. Attivo e disattivato",[],{"id":408,"text":409,"depth":25,"children":410},"s23-6","23.6. Front-end",[],{"id":412,"text":413,"depth":25,"children":414},"s23-7","23.7. Un plugin nel proprio crate",[],{"id":416,"text":417,"depth":25,"children":418},"s23-8","23.8. Test",[],{"id":420,"text":421,"depth":25,"children":422},"s23-9","23.9. Trasformare una slice esistente in un plugin",[],{"id":424,"text":425,"depth":25,"children":426},"s23-10","23.10. Applicazione delle regole",[],{"id":428,"text":429,"depth":25,"children":430},"s23-11","23.11. Plugin dall'esterno",[],{"id":432,"text":433,"depth":20,"children":434},"s24","24. Pacchetti di plugin",[435,439,443,447,451,455,459,463,467,471,475],{"id":436,"text":437,"depth":25,"children":438},"s24-1","24.1. Plugin integrato o pacchetto",[],{"id":440,"text":441,"depth":25,"children":442},"s24-2","24.2. La regola del processo",[],{"id":444,"text":445,"depth":25,"children":446},"s24-3","24.3. Struttura",[],{"id":448,"text":449,"depth":25,"children":450},"s24-4","24.4. Il manifest",[],{"id":452,"text":453,"depth":25,"children":454},"s24-5","24.5. Il protocollo",[],{"id":456,"text":457,"depth":25,"children":458},"s24-6","24.6. Punti di estensione per i pacchetti",[],{"id":460,"text":461,"depth":25,"children":462},"s24-7","24.7. Firma e store",[],{"id":464,"text":465,"depth":25,"children":466},"s24-8","24.8. Ciclo di vita",[],{"id":468,"text":469,"depth":25,"children":470},"s24-9","24.9. Permessi",[],{"id":472,"text":473,"depth":25,"children":474},"s24-10","24.10. Test",[],{"id":476,"text":477,"depth":25,"children":478},"s24-11","24.11. Applicazione delle regole",[],{"id":480,"text":481,"depth":20,"children":482},"s25","25. Cronologia delle versioni",[],81,1795449740606]