Size and speed
Measure the binary. Keep startup fast. Host binaries stay external.
Why this exists
tny stays fast, portable and small through measurement. There is no binary-size ceiling and no product goal to undercut another harness on artifact size. Host binaries stay external.
Historical bake-off
Current stripped tny v0.39.0 binary on this build host: 1,252,408 B (1.2 MiB). The comparison below is a historical v0.3.0 macOS arm64 bake-off against fx v0.0.3; do not treat its binary size, startup or RSS as current measurements. These numbers are evidence, not a mission:
| Metric | fx 0.0.3 | tny | Result |
|---|---|---|---|
| Stripped binary | 6,748,416 B (6.4 MiB) | 749,264 B (0.71 MiB) | 9.0× smaller |
--version | 2.2 ms ± 0.3 | 1.7 ms ± 0.2 | 1.3× faster |
| Max RSS | 3.0 MiB | 2.1 MiB | 1.4× less memory |
| TUI first prompt | — | 3.3–4.3 ms | budget < 10 ms |
Do not publish a 10 µs claim. That number is fx's FX_BENCH=1 path (parse argv, exit before TTY). Former 1.5 MiB / 1.8 MiB / 6 MB tny ceilings are historical.
Time to first token
Everything between Enter and the provider seeing the turn is pre-paid or overlapped. Each turn runs in a detached native session runner. tny ask connects while it reads a piped prompt.
| Path | before | after |
|---|---|---|
| TUI: Enter → first output | 411 ms | 6 ms |
ask with piped stdin | 875 ms | 449 ms |
What remains is the model's own time to first token. Client-side, tny is not the bottleneck.
Speed budgets
These apply to the tny executable. Host binaries do not count. Artifact size is measured, not capped.
| Command | Must | Stretch |
|---|---|---|
--version / ask --help | < 5 ms median | < 2 ms |
| TUI first prompt (no spawn) | < 10 ms | < 5 ms |
How it stays small
- C11 with scoped private C++20 owners; measure C++ runtime dependencies.
- ANSI TUI, not a widget kit.
- yyjson + picohttpparser, vendored as .c files.
- SecureTransport
dlopen'd at first TLS use — eager framework linking costs ~1.2 ms per launch. - Lazy backend load. No upgrade/MCP/skill walk before first prompt.
- No NAPI, sounds, or bundled Node in the default CLI. wasm is the landing terminal, not a second agent loop.