Tsonic GitHub
Edit on GitHub

Architecture

This section is the detailed architecture companion to the main compiler guide.

Read in this order

Current design rules

  • compiler-owned core globals are injected virtually by the frontend
  • ambient surfaces are resolved through surface manifests
  • @tsonic/nodejs is package-driven, not a surface
  • first-party source packages are compiled as part of the same TypeScript program
  • the emitter is AST-only: IR -> CSharpAst -> printer