Skip to content
Crystal CodeDocs
ENEnglish

Architecture overview

This document is the authoritative architecture for the current coding product. Public names may change while the product has no compatibility baseline.

CrystalCode (terminal host: the executable)
↓ ↓
CrystalCode.Display CrystalCode.Engine
↓ ↓
Spectre.Console CrystalCode.Providers
(rasterization; ↓
Terminal.Gui is Crystal
referenced, 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 and
Crystal.Tools. CrystalCode references
Spectre.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, the
engine, or the executable host. CrystalCode.Engine does not reference
Spectre.Console, Terminal.Gui, CrystalCode.Display, or the executable
host, and it never touches the console. CrystalCode.Providers
references only Crystal. No project in this repository modifies Crystal.

A second front end (a desktop application, for example) references CrystalCode.Engine and supplies its own surface. It does not copy engine code. If that desktop front end is built with Avalonia, write the UI in C# markup. Do not add XAML or AXAML files. EngineAssemblyTests and DisplayAssemblyTests fail the build when either direction above is crossed.

CrystalCode.Tests references CrystalCode. CrystalCode.Engine.Tests references CrystalCode.Engine. CrystalCode.Display.Tests references CrystalCode.Display. CrystalCode.Providers.Tests references CrystalCode.Providers.