import{_ as a,c as r,o as t,ae as o}from"./chunks/framework.l7bN90nj.js";const d=JSON.parse('{"title":"Architecture","description":"","frontmatter":{},"headers":[],"relativePath":"zh/design/architecture.md","filePath":"zh/design/architecture.md"}'),i={name:"zh/design/architecture.md"};function c(l,e,h,n,s,u){return t(),r("div",null,[...e[0]||(e[0]=[o('<h1 id="architecture" tabindex="-1">Architecture <a class="header-anchor" href="#architecture" aria-label="Permalink to &quot;Architecture&quot;">​</a></h1><h2 id="protocol" tabindex="-1">Protocol <a class="header-anchor" href="#protocol" aria-label="Permalink to &quot;Protocol&quot;">​</a></h2><p>使用 C++ 来描述 <a href="https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/" target="_blank" rel="noreferrer">Language Server Protocol</a> 中的类型定义。</p><h2 id="ast" tabindex="-1">AST <a class="header-anchor" href="#ast" aria-label="Permalink to &quot;AST&quot;">​</a></h2><p>对 clang AST 接口的一些方便的封装</p><h2 id="async" tabindex="-1">Async <a class="header-anchor" href="#async" aria-label="Permalink to &quot;Async&quot;">​</a></h2><p>使用 C++20 coroutine 对 libuv 协程的封装</p><h2 id="compiler" tabindex="-1">Compiler <a class="header-anchor" href="#compiler" aria-label="Permalink to &quot;Compiler&quot;">​</a></h2><p>对 clang 编译接口的封装，负责实际的编译过程，以及各种编译信息的获取。</p><h2 id="feature" tabindex="-1">Feature <a class="header-anchor" href="#feature" aria-label="Permalink to &quot;Feature&quot;">​</a></h2><p>各种 LSP 特性的具体实现。</p><h2 id="server" tabindex="-1">Server <a class="header-anchor" href="#server" aria-label="Permalink to &quot;Server&quot;">​</a></h2><p>clice 是一个语言服务器，首先是一个服务器。它使用 <a href="https://github.com/libuv/libuv" target="_blank" rel="noreferrer">libuv</a> 作为事件库，采用常见的事件驱动的编译模型。主线程负责处理请求以及分发任务，线程池负责执行耗时的任务，比如编译任务。相关的代码位于 <code>Server</code> 目录下。</p><h2 id="support" tabindex="-1">Support <a class="header-anchor" href="#support" aria-label="Permalink to &quot;Support&quot;">​</a></h2><p>一些其它的工具库。</p>',15)])])}const f=a(i,[["render",c]]);export{d as __pageData,f as default};
