Tsonic is a compiler that translates TypeScript into C# and compiles it to a NativeAOT binary. Current version 0.0.84 is pre-release and under active development with weekly commits. Compared to other TypeScript-to-native tools (like ts-node, Bun, Deno), Tsonic targets full ahead-of-time compilation via .NET NativeAOT, offering potential performance improvements and direct interoperability with the .NET ecosystem. It is CLI-based and requires Node.js 22+ and .NET 10 SDK. The package is distributed as a global or dev dependency npm package and is still experimental; breaking changes are likely.
npm install tsonicNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installs Tsonic globally, creates a new workspace, builds, and runs the default NativeAOT binary.
Pin exact version and test frequently; expect breaking changes.
Use `tsonic execute` if available, or follow issue tracker.
Install .NET 10 SDK from https://dotnet.microsoft.com/download/dotnet/10.0
Run `tsonic init` before any other command.
If you need CLR surface, pass `--surface @tsonic/clr` explicitly.
Install .NET 10 SDK from https://dotnet.microsoft.com/download/dotnet/10.0
Run `npm install -g tsonic` or use `npx tsonic`.
Run `npx tsonic init` in the desired workspace directory.