[{"data":1,"prerenderedAt":481},["ShallowReactive",2],{"blog-slat-2-ja":3},{"number":4,"title":5,"summary":6,"parts":7,"toc":14,"minutes":480},2,"1ページで見るSLAT","@@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>覚えておくべき6つの文です。\u003C\u002Fp>\n\u003Col>\n\u003Cli>\u003Cstrong>Tauriを知っているのは\u003Ccode>app\u003C\u002Fcode> crateだけです。\u003C\u002Fstrong> それ以外はすべてウィンドウなしでコンパイルされ、テストされます。\u003C\u002Fli>\n\u003Cli>\u003Cstrong>機能は1つのスライスに収まり、スライスのファイルは決まっています。\u003C\u002Fstrong> チャットを探していますか。それは\u003Ccode>core\u002Fchat\u002F\u003C\u002Fcode>と\u003Ccode>app\u002Fchat\u002F\u003C\u002Fcode>にあります。\u003C\u002Fli>\n\u003Cli>\u003Cstrong>Tauriコマンドは最大10行です。\u003C\u002Fstrong> デシリアライズし、スライスの関数を1つ呼び、結果をDTOに変換します。\u003C\u002Fli>\n\u003Cli>\u003Cstrong>長く生きる状態の所有者は1人、アクターです。\u003C\u002Fstrong> アプリケーションの状態に\u003Ccode>Mutex&lt;Option&lt;…&gt;&gt;\u003C\u002Fcode>や\u003Ccode>AtomicBool\u003C\u002Fcode>を置かず、スライスの中に状態を持つ\u003Ccode>static\u003C\u002Fcode>を置きません。\u003C\u002Fli>\n\u003Cli>\u003Cstrong>依存は下を向きます。\u003C\u002Fstrong> 下位のティアが上位のティアをインポートすることはなく、それをコンパイラーが強制します。\u003C\u002Fli>\n\u003Cli>\u003Cstrong>オペレーティングシステムを知っているのは\u003Ccode>drivers\u002Fsrc\u002Fplatform\u002F\u003C\u002Fcode>だけです。\u003C\u002Fstrong> それ以外は概念（プロセスグループ、シークレット、データフォルダー）を求め、システムコールを求めることはありません。\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. SLATが存在する理由",[19,24,28],{"id":20,"text":21,"depth":22,"children":23},"s1-1","1.1. 目標",3,[],{"id":25,"text":26,"depth":22,"children":27},"s1-2","1.2. 目標としないこと",[],{"id":29,"text":30,"depth":22,"children":31},"s1-3","1.3. 誰が使うべきか",[],{"id":33,"text":34,"depth":4,"children":35},"s2","2. 1ページで見るSLAT",[],{"id":37,"text":38,"depth":4,"children":39},"s3","3. 用語",[],{"id":41,"text":42,"depth":4,"children":43},"s4","4. SLATの由来",[],{"id":45,"text":46,"depth":4,"children":47},"s5","5. ティア",[48,52,56,60],{"id":49,"text":50,"depth":22,"children":51},"s5-1","5.1. コンパイラーが番人",[],{"id":53,"text":54,"depth":22,"children":55},"s5-2","5.2. 最初はいくつのcrateから始めるか",[],{"id":57,"text":58,"depth":22,"children":59},"s5-3","5.3. ティアを分割するとき",[],{"id":61,"text":62,"depth":22,"children":63},"s5-4","5.4. 互換性のための例外",[],{"id":65,"text":66,"depth":4,"children":67},"s6","6. スライス",[68,72,76,80,84],{"id":69,"text":70,"depth":22,"children":71},"s6-1","6.1. coreのスライス",[],{"id":73,"text":74,"depth":22,"children":75},"s6-2","6.2. appのスライス",[],{"id":77,"text":78,"depth":22,"children":79},"s6-3","6.3. コマンドの基準形",[],{"id":81,"text":82,"depth":22,"children":83},"s6-4","6.4. コマンドの登録",[],{"id":85,"text":86,"depth":22,"children":87},"s6-5","6.5. スライスの命名",[],{"id":89,"text":90,"depth":4,"children":91},"s7","7. 誰が誰をインポートしてよいか",[92,96,100],{"id":93,"text":94,"depth":22,"children":95},"s7-1","7.1. スライスの内部",[],{"id":97,"text":98,"depth":22,"children":99},"s7-2","7.2. スライス間",[],{"id":101,"text":102,"depth":22,"children":103},"s7-3","7.3. なぜこの線引きなのか",[],{"id":105,"text":106,"depth":4,"children":107},"s8","8. データの流れ",[108,112,116,120],{"id":109,"text":110,"depth":22,"children":111},"s8-1","8.1. クエリ（読み取り）",[],{"id":113,"text":114,"depth":22,"children":115},"s8-2","8.2. コマンド（変更）",[],{"id":117,"text":118,"depth":22,"children":119},"s8-3","8.3. イベント（バックエンド → ウィンドウ）",[],{"id":121,"text":122,"depth":22,"children":123},"s8-4","8.4. 大量のストリーム",[],{"id":125,"text":126,"depth":4,"children":127},"s9","9. アクター：状態を持つスライス",[128,132,136,140,144],{"id":129,"text":130,"depth":22,"children":131},"s9-1","9.1. アクターを使うとき",[],{"id":133,"text":134,"depth":22,"children":135},"s9-2","9.2. ファイル",[],{"id":137,"text":138,"depth":22,"children":139},"s9-3","9.3. 契約",[],{"id":141,"text":142,"depth":22,"children":143},"s9-4","9.4. 小さなアクターの完全な例",[],{"id":145,"text":146,"depth":22,"children":147},"s9-5","9.5. アクターのテスト",[],{"id":149,"text":150,"depth":4,"children":151},"s10","10. バリエーションの爆発",[],{"id":153,"text":154,"depth":4,"children":155},"s11","11. AppState、コンポジションルート",[156],{"id":157,"text":158,"depth":22,"children":159},"s11-1","11.1. kit::Jobs：一回限りのバックグラウンド作業",[],{"id":161,"text":162,"depth":4,"children":163},"s12","12. プラットフォーム",[164,168,172,176,180,184,188],{"id":165,"text":166,"depth":22,"children":167},"s12-1","12.1. 構成",[],{"id":169,"text":170,"depth":22,"children":171},"s12-2","12.2. 契約",[],{"id":173,"text":174,"depth":22,"children":175},"s12-3","12.3. platform\u002Fの外で禁止されていること",[],{"id":177,"text":178,"depth":22,"children":179},"s12-4","12.4. パス、ファイル、テキスト",[],{"id":181,"text":182,"depth":22,"children":183},"s12-5","12.5. プラットフォームのテスト",[],{"id":185,"text":186,"depth":22,"children":187},"s12-6","12.6. 強制",[],{"id":189,"text":190,"depth":22,"children":191},"s12-7","12.7. 新しいオペレーティングシステムへの移植",[],{"id":193,"text":194,"depth":4,"children":195},"s13","13. エラー",[],{"id":197,"text":198,"depth":4,"children":199},"s14","14. レイヤーごとのテスト",[200,204,208,212,216],{"id":201,"text":202,"depth":22,"children":203},"s14-1","14.1. 統合テストのバイナリは1つ",[],{"id":205,"text":206,"depth":22,"children":207},"s14-2","14.2. traitを使わない偽のドライバー",[],{"id":209,"text":210,"depth":22,"children":211},"s14-3","14.3. 差分に対するミュータント",[],{"id":213,"text":214,"depth":22,"children":215},"s14-4","14.4. updateのプロパティテスト",[],{"id":217,"text":218,"depth":22,"children":219},"s14-5","14.5. エントリを通したテスト",[],{"id":221,"text":222,"depth":4,"children":223},"s15","15. サイズの上限",[],{"id":225,"text":226,"depth":4,"children":227},"s16","16. 強制",[228,232,236,240,244],{"id":229,"text":230,"depth":22,"children":231},"s16-1","16.1. ベースライン付きのチェック",[],{"id":233,"text":234,"depth":22,"children":235},"s16-2","16.2. チェックは失敗できなければならない",[],{"id":237,"text":238,"depth":22,"children":239},"s16-3","16.3. CIのプラットフォームジョブ",[],{"id":241,"text":242,"depth":22,"children":243},"s16-4","16.4. 一式のチェック",[],{"id":245,"text":246,"depth":22,"children":247},"s16-5","16.5. スクリプトより先にリントと禁止",[],{"id":249,"text":250,"depth":4,"children":251},"s17","17. レシピ",[252,256,260,264,268,272,276,280],{"id":253,"text":254,"depth":22,"children":255},"s17-1","17.1. 新しい読み取り（クエリ）",[],{"id":257,"text":258,"depth":22,"children":259},"s17-2","17.2. バックグラウンドの状態を持たない新しい変更（コマンド）",[],{"id":261,"text":262,"depth":22,"children":263},"s17-3","17.3. 新しいスライス",[],{"id":265,"text":266,"depth":22,"children":267},"s17-4","17.4. 状態を持つ新しいフロー（アクター）",[],{"id":269,"text":270,"depth":22,"children":271},"s17-5","17.5. 新しいドライバー（外部の世界）",[],{"id":273,"text":274,"depth":22,"children":275},"s17-6","17.6. ウィンドウ向けの新しいイベント",[],{"id":277,"text":278,"depth":22,"children":279},"s17-7","17.7. 新しいプラットフォーム",[],{"id":281,"text":282,"depth":22,"children":283},"s17-8","17.8. これはどこに置くのか（決定木）",[],{"id":285,"text":286,"depth":4,"children":287},"s18","18. コーディングエージェントとの協働",[],{"id":289,"text":290,"depth":4,"children":291},"s19","19. 既存のコードベースの移行",[292,296,300,304],{"id":293,"text":294,"depth":22,"children":295},"s19-1","19.1. 順序",[],{"id":297,"text":298,"depth":22,"children":299},"s19-2","19.2. 移行のルール",[],{"id":301,"text":302,"depth":22,"children":303},"s19-3","19.3. 構成を先に、より速いスタート",[],{"id":305,"text":306,"depth":22,"children":307},"s19-4","19.4. よくある失敗",[],{"id":309,"text":310,"depth":4,"children":311},"s20","20. ケーススタディ：Quayside",[312,316,320,324],{"id":313,"text":314,"depth":22,"children":315},"s20-1","20.1. 移行前",[],{"id":317,"text":318,"depth":22,"children":319},"s20-2","20.2. コードに現れる症状",[],{"id":321,"text":322,"depth":22,"children":323},"s20-3","20.3. 移行の手順",[],{"id":325,"text":326,"depth":22,"children":327},"s20-4","20.4. 移行後",[],{"id":329,"text":330,"depth":4,"children":331},"s21","21. 導入チェックリストとFAQ",[332,336,340],{"id":333,"text":334,"depth":22,"children":335},"s21-1","21.1. 新しいプロジェクトのチェックリスト",[],{"id":337,"text":338,"depth":22,"children":339},"s21-2","21.2. 既存のプロジェクトのチェックリスト",[],{"id":341,"text":342,"depth":22,"children":343},"s21-3","21.3. よくある質問",[],{"id":345,"text":346,"depth":4,"children":347},"s22","22. ビルドとテストの時間",[348,352,356,360,364,368,372,376],{"id":349,"text":350,"depth":22,"children":351},"s22-1","22.1. 時間はどこに使われるか",[],{"id":353,"text":354,"depth":22,"children":355},"s22-2","22.2. ビルドの設定",[],{"id":357,"text":358,"depth":22,"children":359},"s22-3","22.3. 1つのフィーチャーの組",[],{"id":361,"text":362,"depth":22,"children":363},"s22-4","22.4. 変更が影響しうるものを実行する",[],{"id":365,"text":366,"depth":22,"children":367},"s22-5","22.5. 多くの作業コピー",[],{"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. ビルドが最初からやり直しになる原因",[],{"id":377,"text":378,"depth":22,"children":379},"s22-8","22.8. target\u002Fの掃除",[],{"id":381,"text":382,"depth":4,"children":383},"s23","23. プラグイン",[384,388,392,396,400,404,408,412,416,420,424],{"id":385,"text":386,"depth":22,"children":387},"s23-1","23.1. 機能をプラグインにするとき",[],{"id":389,"text":390,"depth":22,"children":391},"s23-2","23.2. 構成",[],{"id":393,"text":394,"depth":22,"children":395},"s23-3","23.3. 向き",[],{"id":397,"text":398,"depth":22,"children":399},"s23-4","23.4. 拡張ポイント",[],{"id":401,"text":402,"depth":22,"children":403},"s23-5","23.5. オンとオフ",[],{"id":405,"text":406,"depth":22,"children":407},"s23-6","23.6. フロントエンド",[],{"id":409,"text":410,"depth":22,"children":411},"s23-7","23.7. 独自のcrateに置くプラグイン",[],{"id":413,"text":414,"depth":22,"children":415},"s23-8","23.8. テスト",[],{"id":417,"text":418,"depth":22,"children":419},"s23-9","23.9. 既存のスライスをプラグインにする",[],{"id":421,"text":422,"depth":22,"children":423},"s23-10","23.10. 強制",[],{"id":425,"text":426,"depth":22,"children":427},"s23-11","23.11. 外部からのプラグイン",[],{"id":429,"text":430,"depth":4,"children":431},"s24","24. プラグインパッケージ",[432,436,440,444,448,452,456,460,464,468,472],{"id":433,"text":434,"depth":22,"children":435},"s24-1","24.1. 組み込みプラグインかパッケージか",[],{"id":437,"text":438,"depth":22,"children":439},"s24-2","24.2. プロセスのルール",[],{"id":441,"text":442,"depth":22,"children":443},"s24-3","24.3. 構成",[],{"id":445,"text":446,"depth":22,"children":447},"s24-4","24.4. マニフェスト",[],{"id":449,"text":450,"depth":22,"children":451},"s24-5","24.5. プロトコル",[],{"id":453,"text":454,"depth":22,"children":455},"s24-6","24.6. パッケージの拡張ポイント",[],{"id":457,"text":458,"depth":22,"children":459},"s24-7","24.7. 署名とストア",[],{"id":461,"text":462,"depth":22,"children":463},"s24-8","24.8. ライフサイクル",[],{"id":465,"text":466,"depth":22,"children":467},"s24-9","24.9. 権限",[],{"id":469,"text":470,"depth":22,"children":471},"s24-10","24.10. テスト",[],{"id":473,"text":474,"depth":22,"children":475},"s24-11","24.11. 強制",[],{"id":477,"text":478,"depth":4,"children":479},"s25","25. バージョン履歴",[],98,1795449745099]