Edit source

Tsonic manual

Tsonic compiles TypeScript into native source projects. The manual starts with a complete program, then explains the few choices that affect what gets built.

Start here

  1. Build your first program.
  2. Learn how projects and configuration work.
  3. Choose between an application and a library.
  4. Organize packages and workspaces.
  5. Build, test, and deploy with the native toolchain.

Then read the parts that apply to your code:

The reference contains exact option, marker, API, and limitation contracts.

Most TypeScript needs no Tsonic-specific syntax:

export function greet(name: string): string {
  return `Hello, ${name}`;
}

Use a marker only when ordinary TypeScript cannot state an important native distinction, such as an exact integer width, a writable location, a native pointer, or a Rust lifetime.