This guide explains how the compiler-facing packages fit together, which layer owns what, and how to choose the right entry point when you are extending or embedding AXSG.
| Layer | Packages | Purpose |
|---|---|---|
| Host and orchestration | XamlToCSharpGenerator.Compiler |
project discovery, configuration precedence, include graphs, transform-rule application |
| Shared contracts and models | XamlToCSharpGenerator.Core, XamlToCSharpGenerator.Framework.Abstractions |
semantic contracts, diagnostics, parser helpers, framework profile seams |
| Framework implementation | XamlToCSharpGenerator.Avalonia, XamlToCSharpGenerator.NoUi |
binder/emitter/profile implementations |
| Expression and parsing support | XamlToCSharpGenerator.ExpressionSemantics, XamlToCSharpGenerator.MiniLanguageParsing |
Roslyn-backed C# analysis and low-allocation mini-language parsers |
| Roslyn generator bridge | XamlToCSharpGenerator.Generator |
analyzer/source-generator entry point that drives the host from MSBuild/Roslyn |
Use:
Do not start from Compiler or Generator unless you are deliberately composing the lower-level pieces yourself.
Use:
Add a concrete profile package such as:
Start from:
NoUi is the leanest end-to-end reference profile in the repo and is the right place to learn the profile seams before touching the Avalonia implementation.
CompilerOwns project-level normalization:
Primary API:
CoreOwns the cross-layer semantic contracts:
Primary APIs:
Framework.AbstractionsOwns framework seams:
Primary APIs:
Avalonia and NoUiOwn the framework-specific lowering and emission rules:
Primary APIs:
ExpressionSemantics and MiniLanguageParsingOwn the hot-path analysis/parsing layers:
Primary APIs: