架構概覽
本文是目前編碼產品的權威架構。產品沒有相容基線期間,公開名稱可能改變。
CrystalCode (terminal host: the executable) ↓ ↓CrystalCode.Display CrystalCode.Engine ↓ ↓Spectre.Console CrystalCode.Providers(rasterization; ↓Terminal.Gui is Crystalreferenced, not called)
CrystalCode.Engine also references CrystalCode.Tools, CrystalCode.Plugins,Crystal.Tools, Crystal.Agents, and Crystal.Harness directly.CrystalCode.Tools and CrystalCode.Plugins each reference only Crystal andCrystal.Tools. CrystalCode referencesSpectre.Console and Spectre.Console.Cli for its commands and cards.CrystalCode.Display references Spectre.Console and Terminal.Gui only.It does not reference Crystal, Crystal.Tools, CrystalCode.Tools, theengine, or the executable host. CrystalCode.Engine does not referenceSpectre.Console, Terminal.Gui, CrystalCode.Display, or the executablehost, and it never touches the console. CrystalCode.Providersreferences only Crystal. No project in this repository modifies Crystal.第二個前端(例如桌面應用)引用 CrystalCode.Engine 並提供自己的介面。它不複製引擎程式碼。如果該桌面前端用 Avalonia 建置,用 C# markup 寫 UI。不要加入 XAML 或 AXAML 檔案。上面任一方向被跨越時,EngineAssemblyTests 和 DisplayAssemblyTests 會使組建失敗。
CrystalCode.Tests 引用 CrystalCode。 CrystalCode.Engine.Tests 引用 CrystalCode.Engine。 CrystalCode.Display.Tests 引用 CrystalCode.Display。 CrystalCode.Providers.Tests 引用 CrystalCode.Providers。