# Tov

> A TypeScript-shaped programming language for coding agents that compiles to small native binaries via C and clang.

Tov is an open-source programming language from Richie McIlroy, the team behind the Cap screen recorder. It uses TypeScript's syntax and compiles programs to native binaries. The project is at version 0.1.0 and labeled experimental on its site.

## What It Is

Tov is a compiler and language aimed at coding agents. Its checker, written in Rust, validates TypeScript-style code, generates a single C file, and hands it to clang, producing one native binary. The language leaves out `any`, `null` and `==`, separates `int` and `f64`, and marks fallible calls with `try`. Files use the `.tov` extension, and the README also describes running plain TypeScript files.

## How the agent workflow works

An agent installs Tov, reads the published llms.txt, writes `.tov` files, and runs `tov check --json` after each edit. Each error carries a code and, where the fix is clear, an edit marked with an applicability level such as "safe" that the agent can apply. Programs run with `tov run` and ship with `tov build`; `tov test` runs tests that sit next to the code and `--watch` restarts on save.

## Runtime and compatibility

Values are reference-counted in the generated C, so there is no garbage collector. The runtime is a C library providing the event loop, HTTP server and client, strings, arrays and maps. It supports `Bun.serve`, `fetch()`, a Node-style standard library, async/await, classes, generics and unions. npm packages run on JavaScriptCore and add that engine to the binary. It works on macOS and Linux; Windows, its own package manager, TLS sockets and worker threads for npm packages, and some TypeScript features such as tuples and enums are not yet supported.

## Performance claims

The Tov site and README report benchmarks, measured on an Apple M4 Max, in which Tov beats Rust, C, Bun and Node on many programs, with lower memory use and faster compile times. These are vendor-published results, and the repository documents the method. The site also describes experiments on Cap, including a screen encoder written in Tov and a media server compiled unchanged, which it says do not run in Cap's production yet.

## Features
- TypeScript-style syntax compiled to native binaries
- Compiler checks with machine-readable JSON fixes via tov check --json
- Generates C and builds with clang into a single binary
- Reference counting with no garbage collector
- Bun.serve, fetch and Node-style standard library support
- npm package support via JavaScriptCore, including native addons
- Built-in test runner (tov test) and watch mode
- Checked errors with try, int and f64 types, no any/null/==
- Integer overflow trapping by default

## Integrations
Bun, Node.js, npm, clang, JavaScriptCore

## Platforms
WINDOWS, MACOS, LINUX, WEB, API, CLI

## Pricing
Open Source

## Version
0.1.0

## Links
- Website: https://tov.sh
- Documentation: https://github.com/richiemcilroy/Tov/blob/main/docs/spec.md
- Repository: https://github.com/richiemcilroy/Tov
- EveryDev.ai: https://www.everydev.ai/tools/tov
