A client written in TSX, right beside Rust
In NSH only your app’s code is JS. The reactive graph, the renderer, layout and every module are Rust. TSX and Rust apps share the same native execution pipeline.
- 120 FPS
- 22 live sparklines, an order book and a tape updating together, frame p95 under 4 ms
- ~0.1 ms
- Engine startup (75–155 µs)
- ~1 ms
- First frame of a counter app
- ~0.12 ms
- One tap, from event to commit
- < 1 KB
- A hello world’s app code
- ~1.1 MB
- A TSX app’s download on the web (Wasm runtime)
Small apps measured: a few MB above the bare system window | TSX | Rust | Bare system window |
|---|
| Memory footprint, macOS | ~20 MB | ~19 MB | ~17 MB |
|---|
| Private dirty memory, Linux (GTK, GL) | ~48 MB | ~44 MB | ~38 MB |
|---|
| Above the system window, macOS / Linux | +3 / +9 MB | +2 / +5 MB | |
|---|
| Private working set, Windows | ~15 MB | ~14 MB | |
|---|
Size on each platform: nsh init’s hello world | TSX executable | TSX package | Rust executable | Rust package |
|---|
| macOS (Apple silicon) | 19.8 MB | 9.5 MB | 12.4 MB | 6.0 MB |
|---|
| Linux (x86_64) | 25.7 MB | 11.6 MB | 16.5 MB | 7.5 MB |
|---|
| Windows (x86_64) | 28.6 MB | 12.4 MB | 15.0 MB | 6.7 MB |
|---|
| Web | — | ~1.1 MB download | — | — |
|---|
Release builds. Memory at rest: macOS footprint on an Apple M3 (the counter app and the Rust template at 1200 × 800; the system window holds one label at 480 × 640); Linux private dirty memory on an NVIDIA RTX 3060 Ti (nsh init’s TSX and Rust templates and a GTK window with one label, all at 480 × 640); Windows private working set. Each platform’s measure, with RSS and USS, is in the report. Sizes: nsh package’s release builds, with link-time optimization and stripped; the TSX executable holds the QuickJS runtime, the app’s code is under 1 KB; the package is the zipped .app on macOS, the .tar.gz on Linux and the .zip on Windows; on the web, what the browser downloads, runtime and app. The full performance report