Tsonic documentation
Tsonic compiles TypeScript into target-native source projects. TypeScript is the authored language; C#, Rust or Mojo is the generated language; the native target toolchain owns the final build.
TypeScript source
-> TSTS parse, bind, check, and finalized semantic evidence
-> Tsonic project and target orchestration
-> target analysis, classification, planning, and target AST
-> target printer and project artifacts
-> dotnet, Cargo or Mojo
This directory is the canonical documentation source for the Tsonic host, the C#, Rust and Mojo targets, shared source semantics, surfaces, capabilities, provider authoring, and certification. Package repositories may summarize their local build commands, but they must link here rather than maintain a second product contract.
Table of Contents
Manual
- Manual overview
- Get started
- Compiler model
- Projects
- Applications and libraries
- Packages and workspaces
- Build, test, and deploy
- Source semantics
- Surfaces and capabilities
- Targets
- C# manual
- C# source profile
- C# interop and safety
- C# projects and output
- Rust manual
- Rust source profile
- Rust ownership and safety
- Rust projects and output
- Mojo manual
- Mojo source profile
- Mojo ownership and safety
- Mojo projects and output
- Troubleshooting
Reference
- Reference overview
- CLI
tsonic.json- Toolchains and platforms
- Shared limitations
- TypeScript types and utilities
- Neutral types and markers
- JavaScript source profile
- Node capability
- Diagnostics
- Package catalog
- C# reference
- C# configuration
- C# source modules
- C# type mapping
- C# native APIs
- C# JavaScript surface
- C# Node capability
- C# provider API
- C# language support
- C# support inventory
- C# limitations
- Rust reference
- Rust configuration
- Rust source modules
- Rust type mapping
- Rust ownership and lifetimes
- Rust native APIs
- Rust JavaScript surface
- Rust Node capability
- Rust provider API
- Rust language support
- Rust support inventory
- Rust limitations
- Mojo reference
- Mojo configuration
- Mojo source modules
- Mojo type mapping
- Mojo native APIs
- Mojo JavaScript surface
- Mojo Node capability
- Mojo provider API
- Mojo language support
- Mojo support inventory
- Mojo limitations
Architecture
- Architecture overview
- Compilation lifecycle
- Target-pack contract
- Provider and runtime ownership
- Workspace policy
Validation
The target manuals use the same structure where the targets have the same responsibility. Target-native concepts remain target-native. C# documents assemblies, attributes, and NativeAOT. Rust documents foundations, ownership, lifetimes, traits, and Cargo. Mojo documents compile-time operations, origins and Pixi projects.
Documentation rules
- User-facing behavior is demonstrated with TypeScript input and observable target behavior.
- Exact option, marker, module, and support inventories live in reference pages, not in introductory prose.
- Targets use symmetric document locations only where their ownership is genuinely symmetric.
- Unsupported behavior is documented as a precise semantic boundary, never as a vague roadmap statement.
- Counts and support tables are mechanically checked; prose does not become a second source of truth.