Show HN: The Tsonic Programming Language

https://news.ycombinator.com/rss Hits: 10
Summary

Tsonic Tsonic is a TypeScript to C# compiler that produces native executables via .NET NativeAOT. Write TypeScript, get fast native binaries. Why Tsonic? Tsonic lets TypeScript/JavaScript developers build fast native apps on .NET: Native binaries (no JS runtime). .NET standard library: use the .NET runtime + BCL (files, networking, crypto, concurrency, etc.). Node-style APIs when you want them: optional compatibility packages like @tsonic/nodejs. Still TypeScript: your code still typechecks with tsc. Tsonic also adds CLR-style numeric types like int, uint, long, etc. via @tsonic/core/types.js. Better security: you build on a widely used runtime and standard library with regular updates. Tsonic targets the .NET BCL (not Node’s built-in modules). If you want Node-like APIs, install @tsonic/nodejs. Why C# + NativeAOT? Tsonic compiles TypeScript to C#, then uses the standard CLR NativeAOT pipeline (dotnet publish) to produce native binaries. TypeScript maps well to C#/.NET: Classes, interfaces, generics: translate naturally to CLR types. Async/await: TS async maps cleanly to Task/ValueTask. Iterators and generators: map to C# iterator patterns. Delegates/callbacks: map to Action/Func without inventing a new runtime ABI. NativeAOT produces single-file, self-contained native executables. Details live in the docs: /tsonic/build-output/ and /tsonic/architecture/pipeline/. Key Features TypeScript to Native: Compile TypeScript directly to native executables Direct .NET Access: Full access to .NET BCL with native performance NativeAOT Compilation: Single-file, self-contained executables Full .NET Interop: Import and use any .NET library ESM Module System: Standard ES modules with .js import specifiers Installation npm install -g tsonic Prerequisites: Quick Start Initialize a New Project mkdir my-app && cd my-app tsonic project init This creates: src/App.ts - Entry point tsonic.json - Configuration package.json - With build scripts Build and Run npm run build # Build native exe...

First seen: 2026-01-14 06:08

Last seen: 2026-01-14 15:10